You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by gh...@apache.org on 2014/06/18 16:59:39 UTC
svn commit: r1603473 - in /roller/trunk/app/src/main/webapp:
WEB-INF/velocity/weblog.vm themes/basic/_day-mobile.vm themes/basic/_day.vm
themes/basic/sidebar.vm themes/basic/weblog-mobile.vm themes/basic/weblog.vm
Author: ghuber
Date: Wed Jun 18 14:59:38 2014
New Revision: 1603473
URL: http://svn.apache.org/r1603473
Log:
jquery mobile 1.4.2
Modified:
roller/trunk/app/src/main/webapp/WEB-INF/velocity/weblog.vm
roller/trunk/app/src/main/webapp/themes/basic/_day-mobile.vm
roller/trunk/app/src/main/webapp/themes/basic/_day.vm
roller/trunk/app/src/main/webapp/themes/basic/sidebar.vm
roller/trunk/app/src/main/webapp/themes/basic/weblog-mobile.vm
roller/trunk/app/src/main/webapp/themes/basic/weblog.vm
Modified: roller/trunk/app/src/main/webapp/WEB-INF/velocity/weblog.vm
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/WEB-INF/velocity/weblog.vm?rev=1603473&r1=1603472&r2=1603473&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/WEB-INF/velocity/weblog.vm (original)
+++ roller/trunk/app/src/main/webapp/WEB-INF/velocity/weblog.vm Wed Jun 18 14:59:38 2014
@@ -544,21 +544,21 @@ Show weblog's categories in specified pa
## Mobile version
#macro(showMobileCategoryLinksList)
<!-- showMobileCategoryLinksList -->
- <div data-role="popup" id="categories" data-theme="none">
- <div data-role="collapsible-set" data-theme="b" data-content-theme="a" data-collapsed-icon="arrow-r" data-expanded-icon="arrow-d" style="margin:0; width:250px;">
+ <div data-role="popup" id="categories">
+ <div data-role="collapsible-set" data-theme="a" data-content-theme="a" data-collapsed-icon="arrow-r" data-expanded-icon="arrow-d" style="margin:0; width:250px;">
<div data-role="collapsible" data-collapsed="false" data-inset="false">
<h2>Categories</h2>
<ul data-role="listview">
#if ($model.weblogCategory || $model.permalink)
<li><a href="$url.home" data-transition="fade">$text.get("macro.weblog.allcategories")</a></li>
#else
- <li class="ui-btn-active"><a href="$url.home" data-transition="fade">$text.get("macro.weblog.allcategories")</a></li>
+ <li data-icon="gear" class="ui-btn-active"><a href="$url.home" data-transition="fade">$text.get("macro.weblog.allcategories")</a></li>
#end
#set($active = $text.get("macro.weblog.allcategories"))
#set($cats = $model.weblog.getWeblogCategories())
#foreach($cat in $cats)
#if ($model.weblogCategory && $model.weblogCategory.name == $cat.name || ($model.permalink && $model.weblogEntry.category.name == $cat.name))
- <li class="ui-btn-active"><a href="$url.category($cat.name)" data-transition="fade">$cat.name</a></li>
+ <li data-icon="gear" class="ui-btn-active"><a href="$url.category($cat.name)" data-transition="fade">$cat.name</a></li>
#set($active = $cat.name)
#else
<li><a href="$url.category($cat.name)" data-transition="fade">$cat.name</a></li>
Modified: roller/trunk/app/src/main/webapp/themes/basic/_day-mobile.vm
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/themes/basic/_day-mobile.vm?rev=1603473&r1=1603472&r2=1603473&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/themes/basic/_day-mobile.vm (original)
+++ roller/trunk/app/src/main/webapp/themes/basic/_day-mobile.vm Wed Jun 18 14:59:38 2014
@@ -1,3 +1,5 @@
+## $model here is a PageModel
+## $entry here is a WeblogEntryWrapper
<!-- _day-mobile -->
<ul data-role="listview" data-divider-theme="b" data-inset="true">
<li data-role="list-divider">$utils.formatDate($day, "EEEE MMM dd, yyyy")</li>
@@ -6,12 +8,12 @@
<li data-role="list-divider" data-theme="a">
<div>
$entry.title
- #if ($utils.isUserAuthorizedToAuthor($entry.website))
- <a href="$url.editEntry($entry.anchor)" data-role="button" data-inline="true" data-mini="true">$text.get("macro.weblog.entrypermalink.edit")</a>
- #end
#set($commentCount = $entry.commentCount)
+ #if($utils.isUserAuthorizedToAuthor($entry.website))
+ | <a href="$url.editEntry($entry.anchor)" data-role="button" data-inline="true" data-mini="true">$text.get("macro.weblog.entrypermalink.edit")</a>
+ #end
#if($entry.commentsStillAllowed || $commentCount > 0)
- $text.get("macro.weblog.comments") [$commentCount]
+ | $text.get("macro.weblog.comments") [$commentCount]
#end
</div>
</li>
Modified: roller/trunk/app/src/main/webapp/themes/basic/_day.vm
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/themes/basic/_day.vm?rev=1603473&r1=1603472&r2=1603473&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/themes/basic/_day.vm (original)
+++ roller/trunk/app/src/main/webapp/themes/basic/_day.vm Wed Jun 18 14:59:38 2014
@@ -1,3 +1,6 @@
+## $model here is a PageModel
+## $entry here is a WeblogEntryWrapper
+<!-- _day -->
<div class="dayBox">
<div class="dayTitle">
@@ -5,7 +8,7 @@
</div>
#foreach( $entry in $entries )
- <div class="entryBox">
+ <div class="entryBox">
<a name="$utils.encode($entry.anchor)" id="$utils.encode($entry.anchor)"></a>
<p class="entryTitle">$entry.title</p>
<p class="entryContent">
@@ -28,7 +31,7 @@
#end
</p>
#showTrackbackAutodiscovery($entry)
- </div>
+ </div>
#end
</div>
Modified: roller/trunk/app/src/main/webapp/themes/basic/sidebar.vm
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/themes/basic/sidebar.vm?rev=1603473&r1=1603472&r2=1603473&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/themes/basic/sidebar.vm (original)
+++ roller/trunk/app/src/main/webapp/themes/basic/sidebar.vm Wed Jun 18 14:59:38 2014
@@ -1,7 +1,7 @@
## sidebar contents
<div class="mobile">
- <a href="?deviceType=mobile" alt="View Mobile Weblog">View Mobile Weblog</a>
+ <a id="btnMobile" href="#" alt="View Mobile Weblog">View Mobile Weblog</a>
</div>
<h2>Calendar</h2>
Modified: roller/trunk/app/src/main/webapp/themes/basic/weblog-mobile.vm
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/themes/basic/weblog-mobile.vm?rev=1603473&r1=1603472&r2=1603473&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/themes/basic/weblog-mobile.vm (original)
+++ roller/trunk/app/src/main/webapp/themes/basic/weblog-mobile.vm Wed Jun 18 14:59:38 2014
@@ -22,36 +22,31 @@
</script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"></script>
-</head>
-<!-- weblog-mobile -->
-<body>
<script type="text/javascript">
-
$(document).bind("pageinit", function(){
$('#btnStandard').on('click', function() {
- window.location.href="?deviceType=standard";
+ setCookie("roller_user_request_type","standard",30);
+ $("#btnStandard").attr('href', '?deviceType=standard').click();
});
-
- setCookie("roller_user_request_type","mobile",30);
-
});
-
function setCookie(c_name, value, exdays) {
var exdate = new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value = escape(value) + ((exdays == null) ? "" : "; expires=" + exdate.toUTCString() + "; path=/");
document.cookie = c_name + "=" + c_value;
}
-
</script>
+</head>
+<!-- weblog-mobile -->
+<body>
<div id ="home" data-role="page">
<div data-role="header" data-theme="a">
<h1>$model.weblog.name</h1>
- <a href=$url.absoluteSite data-icon="home" data-theme="a">Home</a>
- <a href="#home" id="btnStandard" data-role="button">View Standard</a>
+ <a href="$url.absoluteSite" data-icon="home" data-theme="a">Home</a>
+ <a href="#" id="btnStandard" data-role="button">View Standard</a>
</div>
<div role="main" class="ui-content">
Modified: roller/trunk/app/src/main/webapp/themes/basic/weblog.vm
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/themes/basic/weblog.vm?rev=1603473&r1=1603472&r2=1603473&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/themes/basic/weblog.vm (original)
+++ roller/trunk/app/src/main/webapp/themes/basic/weblog.vm Wed Jun 18 14:59:38 2014
@@ -5,19 +5,26 @@
<title>$model.weblog.name</title>
#showAutodiscoveryLinks($model.weblog)
#showAnalyticsTrackingCode($model.weblog)
+ <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="$model.weblog.stylesheet">
#showMetaDescription()
+ <script type="text/javascript">
+ console.log("init");
+ $(document).ready(function () {
+ $('#btnMobile').on('click', function() {
+ setCookie("roller_user_request_type","mobile",30);
+ $("#btnMobile").attr('href', '?deviceType=mobile').click();
+ });
+ });
+ function setCookie(c_name, value, exdays) {
+ var exdate = new Date();
+ exdate.setDate(exdate.getDate() + exdays);
+ var c_value = escape(value) + ((exdays == null) ? "" : "; expires=" + exdate.toUTCString() + "; path=/");
+ document.cookie = c_name + "=" + c_value;
+ }
+ </script>
</head>
<body>
-<script type="text/javascript">
-function setCookie(c_name, value, exdays) {
- var exdate = new Date();
- exdate.setDate(exdate.getDate() + exdays);
- var c_value = escape(value) + ((exdays == null) ? "" : "; expires=" + exdate.toUTCString() + "; path=/");
- document.cookie = c_name + "=" + c_value;
-}
-setCookie("roller_user_request_type","standard",30);
-</script>
<div id="id_weblog" class="content_wrapper">
<div class="content">