roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ghu...@apache.org
Subject svn commit: r1531069 - in /roller/trunk/app/src/main/webapp: WEB-INF/velocity/weblog.vm themes/basic/_day-mobile.vm themes/basic/_day.vm themes/basic/permalink-mobile.vm themes/basic/searchresults-mobile.vm themes/basic/weblog-mobile.vm
Date Thu, 10 Oct 2013 18:33:19 GMT
Author: ghuber
Date: Thu Oct 10 18:33:19 2013
New Revision: 1531069

URL: http://svn.apache.org/r1531069
Log:
Work in progress...

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/permalink-mobile.vm
    roller/trunk/app/src/main/webapp/themes/basic/searchresults-mobile.vm
    roller/trunk/app/src/main/webapp/themes/basic/weblog-mobile.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=1531069&r1=1531068&r2=1531069&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 Thu Oct 10 18:33:19 2013
@@ -26,6 +26,7 @@ These are the documented macros in order
 
     #showWeblogEntriesPager($pager)
     #showNextPrevEntriesControl($pager)
+    #showMobileNextPrevEntriesControl($pager)
 
     #showWeblogEntryComments($entry)
     #showWeblogEntryCommentForm($entry)
@@ -33,6 +34,7 @@ These are the documented macros in order
     #showWeblogEntryLinksList($entries)
     #showBookmarkLinksList($folderObj $expanding $subfolders)
     #showWeblogCategoryLinksList($categoryObj $expanding $subcats)
+    #showMobileCategoryLinksList($categoryObj)
     #showReferrersList($weblog)
     #showAtomFeedsList($weblog)
     #showRSSFeedsList($weblog)
@@ -43,8 +45,13 @@ These are the documented macros in order
     #showAuthorMenu($vertical)
 
     #showWeblogSearchForm($weblog)
+    #showMobileSearchForm($weblog)
     #showWeblogSearchAgainForm($weblog)
+    #showMobileSearchAgainForm($weblog)
     #showNextPrevSearchControl($pager)
+    #showMobileNextPrevSearchControl($pager)
+    
+    #showMobilePopupDialog($id $header $message)
 
     #_showCommonJavaScript()
     
@@ -161,7 +168,7 @@ Shows weblog entries pager via default d
         #set($nextName = $pager.nextCollectionName)
     #end
     #if ($prevLink)
-        &laquo; <a href="$prevLink">$prevName</a> |  
+        &laquo; <a href="$prevLink">$prevName</a> | 
     #end
     #if ($prevLink || $nextLink)
         <a href="$pager.getHomeLink()">$pager.getHomeName()</a>
@@ -170,6 +177,54 @@ Shows weblog entries pager via default d
         | <a href="$nextLink">$nextName</a> &raquo;
     #end
 #end
+## Mobile Version
+#macro(showMobileNextPrevEntriesControl $pager)
+    #set($prevLink = false)
+    #set($nextLink = false)
+    #if ($pager.prevLink)
+        #set($prevLink = $pager.prevLink)
+        #set($prevName = $pager.prevName)
+    #elseif ($pager.prevCollectionLink)
+        #set($prevLink = $pager.prevCollectionLink)
+        #set($prevName = $pager.prevCollectionName)
+    #end
+    #if ($pager.nextLink)
+        #set($nextLink = $pager.nextLink)
+        #set($nextName = $pager.nextName)
+    #elseif ($pager.nextCollectionLink)
+        #set($nextLink = $pager.nextCollectionLink)
+        #set($nextName = $pager.nextCollectionName)
+    #end
+    #if ($prevLink || $nextLink)
+    <div data-role="navbar" data-iconpos="top">
+      <ul>
+        #if ($prevLink)
+          <li>
+            <a href="$prevLink" data-transition="fade" data-theme="c" data-icon="arrow-l">
+              $prevName
+            </a>
+          </li>
+        #end
+        ## We do not want the home link on the first page >> || $nextLink
+        #if ($prevLink)
+          <li>
+            <a href="$pager.getHomeLink()" data-transition="fade" data-theme="c" data-icon="home">
+              $pager.getHomeName()
+            </a>
+          </li>
+        #end
+        #if ($nextLink)
+          <li>
+            <a href="$nextLink" data-transition="fade" data-theme="c" data-icon="arrow-r">
+              $nextName
+            </a>
+          </li>
+        #end
+      </ul>
+    </div>
+  #end
+    
+#end
 
 
 #** 
@@ -462,7 +517,32 @@ Show weblog's categories in specified pa
         </ul>
     #end
 #end
-
+## Mobile version
+#macro(showMobileCategoryLinksList $categoryObject)
+    <a href="#categories" data-rel="popup" data-role="button">Categories</a>
+    <div data-role="popup" id="categories" data-theme="none">
+      <div data-role="collapsible-set" data-theme="b" data-content-theme="c" 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.category($categoryObject.path)" data-transition="fade">$text.get("macro.weblog.allcategories")</a></li>
+            #else
+              <li class="ui-btn-active"><a href="$url.category($categoryObject.path)"
data-transition="fade">$text.get("macro.weblog.allcategories")</a></li>
+            #end
+            #set($cats = $categoryObject.getWeblogCategories())
+            #foreach($cat in $cats)
+              #if ($model.weblogCategory && $model.weblogCategory.path == $cat.path
|| ($model.permalink && $model.weblogEntry.category.path == $cat.path))
+                <li class="ui-btn-active"><a href="$url.category($cat.path)" data-transition="fade">$cat.name</a></li>
+              #else
+                <li><a href="$url.category($cat.path)" data-transition="fade">$cat.name</a></li>
+              #end
+            #end
+          </ul>
+        </div>
+      </div>
+    </div>
+#end
 
 #**
 Recursively display a bookmark folder and children as HTML ul list (undocumented).
@@ -708,11 +788,9 @@ Show weblog author menu with vertical or
 Show search form for a weblog.
 *#
 #macro(showWeblogSearchForm $weblog $showCatChooser)
-    <form id="searchForm" method="get" action="$url.search"
-        style="margin: 0; padding: 0" onsubmit="return validateSearch(this)">
+    <form id="searchForm" method="get" action="$url.search" style="margin: 0; padding:
0" onsubmit="return validateSearch(this)">
         <p>
-          <input type="text" id="q" name="q" size="10" class="text small"
-              maxlength="255" value="#if($model.term)$model.term#end" />
+          <input type="text" id="q" name="q" size="10" class="text small" maxlength="255"
value="#if($model.term)$model.term#end" />
           #if( $showCatChooser )
             #set( $cats = $model.weblog.getWeblogCategories("nil") )
             <select name="cat">
@@ -736,6 +814,38 @@ Show search form for a weblog.
         }
     </script>
 #end
+## Mobile Version
+#macro(showMobileSearchForm $weblog $showCatChooser)
+    <form id="searchForm" method="get" action="$url.search" onsubmit="return validateSearch(this)">
+        <p>
+          <input type="search" id="q" name="q" placeholder="Search..." maxlength="255"
value="#if($model.term)$model.term#end" />
+          #if( $showCatChooser )
+            #set( $cats = $model.weblog.getWeblogCategories("nil") )
+            <select name="cat">
+            <option value="">- $text.get("mainPage.category") -</option>
+            #foreach( $cat in $cats )
+              <option #if($cat.name == $model.term)selected="selected"#end>$cat.name</option>
+            #end
+            </select>
+          #end
+          <input type="submit" id="searchbutton" data-role="button" data-theme="e" value="$text.get(
"macro.weblog.searchbutton" )" />
+        </p>
+    </form>
+    <script type="text/javascript">
+        function validateSearch(form) {
+            if (form.q.value == "") {
+                $("#searchDialog").popup('open').focus();
+                $("#searchDialog").popup({ afterclose: function( event, ui ) {
+                    form.q.focus();
+                    }
+                });
+                return false;
+            }
+            return true;
+        }
+    </script>
+    #showMobilePopupDialog('searchDialog','Search', $text.get("macro.weblog.searchalert"))
+#end
 
 
 #** 
@@ -746,10 +856,7 @@ Show search again form for a weblog.
         $text.get( "macro.weblog.searchdictionary", [$model.term, $model.term, $model.term]
)
         $text.get( "macro.weblog.searchhits", [$model.hits])
         <form method="get" action="$url.search" style="margin: 5px">
-            <input type="text" id="q" name="q" class="text medium"
-                maxlength="255" value="$model.term"
-                style="padding-left: 1px" /><br />
-
+            <input type="text" id="q" name="q" class="text medium" maxlength="255" value="$model.term"
style="padding-left: 1px" /><br />
             #set( $cats = $model.weblog.getWeblogCategories("nil") )
             <select name="cat" class="select">
             <option value="">$text.get( "macro.searchresults.incategory" )</option>
@@ -764,6 +871,26 @@ Show search again form for a weblog.
         $text.get( "macro.weblog.searchgoogle", [$model.term, $url.absoluteSite, $url.site,
${website.handle}] )
     </div>
 #end
+## Mobile Version
+#macro(showMobileSearchAgainForm $weblog)
+    <div id="searchAgain">
+        $text.get( "macro.weblog.searchdictionary", [$model.term, $model.term, $model.term]
)
+        $text.get( "macro.weblog.searchhits", [$model.hits])
+        <form method="get" action="$url.search" style="margin: 5px">
+            <input type="search" id="q" name="q" placeholder="Search..." maxlength="255"
value="$model.term" />
+            #set( $cats = $model.weblog.getWeblogCategories("nil") )
+            <select name="cat" class="select">
+            <option value="">$text.get( "macro.searchresults.incategory" )</option>
+            #foreach( $cat in $cats )
+              <option #if($cat.name == $model.weblogCategory.name)selected="selected"#end>$cat.name</option>
+            #end
+            </select>
+
+            <input type="submit" data-role="button" data-theme="e" value="$text.get( "macro.weblog.searchagain"
)" />
+        </form>
+
+    </div>
+#end
 
 
 #** 
@@ -797,8 +924,72 @@ Show next/prev pager for search results.
         | <a href="$nextLink">$nextName</a> &raquo;
     #end
 #end
+## Mobile Version
+#macro(showMobileNextPrevSearchControl $pager)
+    #set( $min = $model.offset + 1 )
+    #set( $max = $model.offset + $model.limit )
+    #if( $max > $model.hits )#set( $max = $model.hits )#end
+    <h3>
+       $text.get("searchSummary.text", [$min, $max, $model.hits])
+    </h3>
+    #set($prevLink = false)
+    #set($nextLink = false)
+    #if ($pager.prevLink)
+        #set($prevLink = $pager.prevLink)
+        #set($prevName = $pager.prevName)
+    #end
+    #if ($pager.nextLink)
+        #set($nextLink = $pager.nextLink)
+        #set($nextName = $pager.nextName)
+    #end
+
+    ## Show the pager
+    #if ($prevLink || $nextLink)
+      <div data-role="navbar" data-iconpos="top">
+        <ul>
+          #if ($prevLink)
+            <li>
+              <a href="$prevLink" data-transition="fade" data-theme="c" data-icon="arrow-l">
+                $prevName
+              </a>
+            </li>
+          #end
+          ## We do not want the home link on the first page >> || $nextLink
+          #if ($prevLink)
+            <li>
+              <a href="$pager.getHomeLink()" data-transition="fade" data-theme="c" data-icon="home">
+                $pager.getHomeName()
+              </a>
+            </li>
+          #end
+          #if ($nextLink)
+            <li>
+              <a href="$nextLink" data-transition="fade" data-theme="c" data-icon="arrow-r">
+                $nextName
+              </a>
+            </li>
+          #end
+        </ul>
+      </div>
+    #end
+#end
 
 
+#** 
+Show mobile alert popup.
+*#
+#macro(showMobilePopupDialog $id $header $message)
+ <div data-role="popup" id="$id" data-dismissible="false" style="white-space: normal"
class="ui-corner-all">
+    <div data-role="footer" data-theme="b" class="ui-corner-top">
+      <h1>$header</h1>
+    </div>
+    <div data-role="content" data-theme="d" class="ui-corner-bottom ui-content">
+      <h3 class="wrap ui-title">$message</h3>
+      <a href="#" data-role="button" data-inline="true" data-rel="back" data-transition="fade"
data-theme="c">OK</a>
+    </div>
+  </div>
+#end
+
 #**
 Include Javascript code needed for expanding folder macros (undocumented).
 *#

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=1531069&r1=1531068&r2=1531069&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 Thu Oct 10 18:33:19 2013
@@ -1,4 +1,4 @@
 #foreach( $entry in $entries )
 <ul data-role="listview" data-inset="true" data-dividertheme="b">
-    <li><a href=$entry.permalink>$entry.title</a></li>
+  <li><a href=$entry.permalink>$entry.title</a></li>
 #end

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=1531069&r1=1531068&r2=1531069&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/themes/basic/_day.vm (original)
+++ roller/trunk/app/src/main/webapp/themes/basic/_day.vm Thu Oct 10 18:33:19 2013
@@ -22,7 +22,7 @@
                 <a href="$url.editEntry($entry.anchor)">$text.get("macro.weblog.entrypermalink.edit")</a>
&nbsp;|&nbsp;
             #end
             #set($commentCount = $entry.commentCount)
-            #if($entry.commentsStillAllowed || $commentCount > 0)  
+            #if($entry.commentsStillAllowed || $commentCount > 0)
                 #set($link = "$url.comments($entry.anchor)" )
                 <a href="$link" class="commentsLink">$text.get("macro.weblog.comments")
[$commentCount]</a>
             #end

Modified: roller/trunk/app/src/main/webapp/themes/basic/permalink-mobile.vm
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/themes/basic/permalink-mobile.vm?rev=1531069&r1=1531068&r2=1531069&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/themes/basic/permalink-mobile.vm (original)
+++ roller/trunk/app/src/main/webapp/themes/basic/permalink-mobile.vm Thu Oct 10 18:33:19
2013
@@ -1,89 +1,59 @@
 <!DOCTYPE html>
 <html>
 <head>
-    <title>Blog Post</title>
+  <title>$model.weblogEntry.title : $model.weblog.name</title>
+  <meta name="viewport" content="width=device-width, initial-scale=1">
 
-    <meta name="viewport" content="width=device-width, initial-scale=1">
+  <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css"
/>
+  <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
 
-    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.css"/>
-    <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
-    <script type="text/javascript" src="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.js"></script>
+  <script type="text/javascript">
+
+    $(document).bind("mobileinit", function(){
+      $.mobile.ajaxEnabled = false;
+    });
+
+  </script>
+
+  <script type="text/javascript" src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
 </head>
 <body>
 
-<div data-role="page" data-theme="b">
+  <div data-role="page" data-theme="b">
 
     <div data-role="header" data-theme="b">
-        <h1>Weblog Post</h1>
-        <a data-rel="back" data-icon="back" data-theme="a">Go back</a>
+      <h1>$model.weblogEntry.title : $model.weblog.name</h1>
+      ##<a data-rel="back" data-icon="back" data-theme="a">Go back</a>
+      <a href=$url.home data-icon="home" data-theme = "a">Home</a>
     </div>
-    <!-- /header -->
-
-## show next/previous paging controls
-    #set($pager = $model.getWeblogEntriesPager())
-    #set($prevLink = false)
-    #set($nextLink = false)
-    #if ($pager.prevLink)
-        #set($prevLink = $pager.prevLink)
-        #set($prevName = $pager.prevName)
-    #elseif ($pager.prevCollectionLink)
-        #set($prevLink = $pager.prevCollectionLink)
-        #set($prevName = $pager.prevCollectionName)
-    #end
-    #if ($pager.nextLink)
-        #set($nextLink = $pager.nextLink)
-        #set($nextName = $pager.nextName)
-    #elseif ($pager.nextCollectionLink)
-        #set($nextLink = $pager.nextCollectionLink)
-        #set($nextName = $pager.nextCollectionName)
-    #end
-    <div data-role="navbar">
-        <ul>
-        <li>#if ($prevLink)<a data-icon="arrow-l" data-theme="b" href="$prevLink">$prevName</a></li>#end
-
-            <li>#if ($prevLink || $nextLink)
-                <a data-icon="home" data-theme="b" href="$pager.getHomeLink()"
-                   class="ui-btn-active">$pager.getHomeName()</a>
-            #end </li>
 
-        <li>#if ($nextLink)<a data-icon="arrow-r" data-theme="b" href="$nextLink">$nextName</a></li>#end
-        </ul>
-    </div>
     <div data-role="content" data-theme="c">
-        #set($map = $pager.getEntries())
-        #foreach($day in $map.keySet())
-            #set($entries = $map.get($day))
-        #end
-    ## show entry
-           #foreach( $entry in $entries )
-
-        <h3>$entry.title</h3>
-
-        <p>
-
-        <p> #if($model.permalink)
-            $entry.displayContent
-            <br>
-            <br>
-            Posted at <a href="$url.entry($entry.anchor)">$utils.formatDate($entry.pubTime,
"hh:mma MMM dd, yyyy")</a>
-        #else
-            $entry.displayContent($url.entry($entry.anchor))
-        #end</p></p>
-
-    #end
-    ## show comments and comment form
-           #showWeblogEntryComments($model.weblogEntry)
-    ##showWeblogEntryCommentForm($model.weblogEntry)
-        </p>
+
+      #set($rootCategory = $model.weblog.getWeblogCategory("nil"))
+      #showMobileCategoryLinksList($rootCategory)
+
+      ## show next/previous paging controls
+      #set($pager = $model.getWeblogEntriesPager()) 
+      <div class="next-previous">
+        #showMobileNextPrevEntriesControl($pager)
+      </div>
+
+      ## show entry
+      #showWeblogEntriesPager($pager)
+
+      ## show comments and comment form
+      ## TODO
+      #showWeblogEntryComments($model.weblogEntry)
+      ## TODO
+      ##showWeblogEntryCommentForm($model.weblogEntry)
+    
     </div>
-    <!-- /content -->
 
     <div data-role="footer" data-theme="b">
-        <h4>Apache Roller @ 2011</h4>
+        <h4>Apache Roller Mobile</h4>
     </div>
-    <!-- /footer -->
-</div>
-<!-- /page -->
+    
+  </div>
 
 </body>
 </html>
\ No newline at end of file

Modified: roller/trunk/app/src/main/webapp/themes/basic/searchresults-mobile.vm
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/themes/basic/searchresults-mobile.vm?rev=1531069&r1=1531068&r2=1531069&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/themes/basic/searchresults-mobile.vm (original)
+++ roller/trunk/app/src/main/webapp/themes/basic/searchresults-mobile.vm Thu Oct 10 18:33:19
2013
@@ -1,40 +1,52 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    <title>Search Results for '$model.term' : $model.weblog.name</title>
-    #showAutodiscoveryLinks($model.weblog)
-   <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.css"/>
-    <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
-    <script type="text/javascript" src="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.js"></script>
-</head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <title>Search Results for '$model.term' : $model.weblog.name</title>
+  #showAutodiscoveryLinks($model.weblog)
+  <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css"
/>
+  <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
+
+  <script type="text/javascript">
+
+    $(document).bind("mobileinit", function(){
+      $.mobile.ajaxEnabled = false;
+    });
+
+  </script>
+
+  <script type="text/javascript" src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
 </head>
 <body>
 
-<div data-role="page">
+  <div data-role="page">
     <div data-role="header" data-theme="b">
-<h1> Search Results</h1>
-       <a data-rel="back" data-icon="back" data-theme = "a">back</a>
-       <a href=$url.home  data-icon="home" data-theme = "a">Home</a>
+      <h1> Search Results</h1>
+      ##<a data-rel="back" data-icon="back" data-theme = "a">back</a>
+      <a href=$url.home data-icon="home" data-theme = "a">Home</a>
     </div>
-<br>
-<h3>  Search Results for '$model.term' </h3> 
-        #set($pager = $model.getWeblogEntriesPager()) 
-        ## show entries
-    #set($map = $pager.getEntries())
-    #foreach($day in $map.keySet())
-        #set($entries = $map.get($day))   
-    #end
-       #foreach( $entry in $entries )
-<ul data-role="listview" data-inset="true" data-dividertheme="d">
-    <li><a href=$entry.permalink>$entry.title</a></li>
-#end
+    <br>
+    
+    #set($rootCategory = $model.weblog.getWeblogCategory("nil"))
+    #showMobileCategoryLinksList($rootCategory)
 
-  </div>
-</div>
-<div data-role="footer" data-theme="b">
-        <h4>Apache Roller Mobile @ 2011</h4>
+    <h3>Search Results for '$model.term'</h3>
+    
+    ## show next/previous paging controls
+    #set($pager = $model.getWeblogEntriesPager()) 
+    <div class="next-previous">
+      #showMobileSearchAgainForm($model.weblog)
+      #showMobileNextPrevSearchControl($pager)
     </div>
+    
+    ## show entries
+    #showWeblogEntriesPager($pager)
+    
+  </div>
+
+  <div data-role="footer" data-theme="b">
+    <h4>Apache Roller Mobile</h4>
+  </div>
 
 </body>
 </html>

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=1531069&r1=1531068&r2=1531069&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 Thu Oct 10 18:33:19 2013
@@ -1,52 +1,75 @@
 <!DOCTYPE html>
 <html>
 <head>
-    <title>$model.weblog.name</title>
-    <meta name="viewport" content="width=device-width, initial-scale=1">
-    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.css"/>
-    <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
-    <script type="text/javascript" src="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.js"></script>
+  <title>$model.weblog.name</title>
+  <meta name="viewport" content="width=device-width, initial-scale=1">
+  <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css"
/>
+  <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
+  
+  <script type="text/javascript">
+
+    $(document).bind("mobileinit", function(){
+      $.mobile.ajaxEnabled = false;
+    });
+
+  </script>
+
+  <script type="text/javascript" src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></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;
+  <script type="text/javascript">
+
+    $(document).bind("pageinit", function(){
+      $('#btnStandard').on('click', function() {
+        window.location.href="?deviceType=standard";
+      });
+
+      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;
     }
-setCookie("roller_user_request_type","mobile",30);
-$('#btnStandard').live('vclick' ,function(e) {
-    window.location.href="?deviceType=standard";
-});
-</script>
 
-<div data-role="page" id ="home">
+  </script>
+
+  <div data-role="page" id ="home">
 
     <div data-role="header" data-theme="b">
-        <h1>$model.weblog.name </h1>
-        <a href=$url.home  data-icon="home" data-theme = "a">Home</a>
-       <a href="#home" id="btnStandard" data-role="button">View Standard</a>
-    </div> <!-- /header -->
-
-    <form id="searchForm" method="get" action="search">
-        <div data-role="fieldcontain">
-          <input type="search" name="q" data-inline="true"> <input type="submit"
value="Search" data-inline="true">
-        </div>
-    </form>
+      <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>
+    </div>
 
     <div data-role="content" data-theme="d">
-        #set($rootCategory = $model.weblog.getWeblogCategory("nil"))
-        #set($pager = $model.getWeblogEntriesPager()) 
-        #showWeblogEntriesPager($pager)
-    </div> <!-- /content -->
+
+      ## Search
+      #showMobileSearchForm($model.weblog false)
+
+      #set($rootCategory = $model.weblog.getWeblogCategory("nil"))
+      #showMobileCategoryLinksList($rootCategory)
+
+      ## show next/previous paging controls
+      #set($pager = $model.getWeblogEntriesPager())
+      <div class="next-previous">
+        #showMobileNextPrevEntriesControl($pager)
+      </div>
+
+      ## Show entries
+      #showWeblogEntriesPager($pager)
+
+    </div>
 
     <div data-role="footer" data-theme="b">
-        <h4>Apache Roller Mobile @ 2011</h4>
-    </div> <!-- /footer -->
+      <h4>Apache Roller Mobile</h4>
+    </div>
 
-</div> <!-- /page -->
+  </div>
 
 </body>
 </html>



Mime
View raw message