Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differences #1

Open
wants to merge 8 commits into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 21 additions & 0 deletions MIT License.txt
@@ -0,0 +1,21 @@
Copyright (c) 2013 Victor Valencia (valencia_vik@hotmail.com)
http://victor-valencia.github.com/jquery-mobile-date-navigation

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5 changes: 4 additions & 1 deletion README.md
@@ -1,4 +1,7 @@
jquery-mobile-date-navigation
=============================

Coming soon...
This plugin provides a navigation between date range, either by a defined range (week, month and year). Ideal for querying information accurately by AJAX calls.

Demo and documentation: http://victor-valencia.github.com/jquery-mobile-date-navigation

14 changes: 6 additions & 8 deletions demo.html → demo_advanced.html
@@ -1,12 +1,10 @@
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>

<head>
<title>jQuery Mobile Date Navigation</title>

<title>Advanced :: Date Navigation</title>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down Expand Up @@ -72,12 +70,12 @@

<div data-role="page">

<div data-theme="a" data-role="header">
<h5>jQuery Mobile Date Navigation</h5>
<div data-theme="e" data-role="header">
<h5>Advanced :: Date Navigation</h5>
</div>

<div data-role="content">
<div id="dateNavigation" data-date="2013-01-01" data-range="month"></div>
<div id="dateNavigation"></div>

</br>

Expand Down
61 changes: 61 additions & 0 deletions demo_basic.html
@@ -0,0 +1,61 @@
<!DOCTYPE html>
<html>

<head>

<title>Bassic :: JQuery Mobile Date Navigation</title>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />

<!-- Begin :: Styles -->

<link rel="stylesheet" href="css/jquery-mobile/jquery.mobile-1.2.0.min.css"/>
<link rel="stylesheet" href="css/jquery-mobile/jquery-mobile-fluid960.min.css"/>

<!-- End :: Styles -->

<!-- Begin :: Scripts -->

<script src="js/jquery-1.8.2.min.js"></script>
<script src="js/jquery.mobile-1.2.0.min.js"></script>
<script src="js/jquery.date.core.js"></script>
<script src="js/jquery.mobile.date.navigation.js"></script>

<script type="text/javascript">

$(function(){

$("#dateNavigation").dateNavigation();

});

</script>

<!-- End :: Scripts -->

</head>

<body>

<!-- Begin :: Page -->

<div data-role="page">

<div data-theme="e" data-role="header">
<h5> Basic :: Date Navigation</h5>
</div>

<div data-role="content">
<div id="dateNavigation" data-date="2013-02-14" data-range="month"></div>
</div>

</div>

<!-- End :: Page -->

</body>

</html>
17 changes: 12 additions & 5 deletions js/jquery.mobile.date.navigation.js
Expand Up @@ -74,9 +74,16 @@

var options = $.extend( { }, defaults.options, target.data() );

options = $.extend( { }, options, custom.options );

var events = $.extend( { }, defaults.events, custom.events );
var events = $.extend( { }, defaults.events );

if( custom ) {
if( custom.options ) {
options = $.extend( { }, options, custom.options );
}
if( custom.events ) {
events = $.extend( { }, events, custom.events );
}
}

//console.log("Data by JQuery:");
//console.log(config);
Expand Down Expand Up @@ -106,7 +113,7 @@
tpl += ' </div>';
tpl += ' <div class="container_12">';
tpl += ' <div class="grid_3">';
tpl += ' <a name="prev" href="javascript:;" data-role="button" data-icon="arrow-l" data-theme="b" class="ui-btn ui-btn-icon-left ui-btn-corner-left ui-btn-up-b">';
tpl += ' <a name="prev" href="javascript:;" data-role="button" data-icon="arrow-l" data-theme="c" class="ui-btn ui-btn-icon-left ui-btn-corner-left ui-btn-up-c">';
tpl += ' <span class="ui-btn-inner ui-corner-left">';
tpl += ' <span class="ui-btn-text">&nbsp;</span>';
tpl += ' <span class="ui-icon ui-icon-arrow-l ui-icon-shadow">&nbsp;</span>';
Expand All @@ -129,7 +136,7 @@
tpl += ' </div>';
tpl += ' </div>';
tpl += ' <div class="grid_3">';
tpl += ' <a name="next" href="javascript:;" data-role="button" data-icon="arrow-l" data-theme="b" class="ui-btn ui-btn-icon-right ui-btn-corner-right ui-btn-up-b">';
tpl += ' <a name="next" href="javascript:;" data-role="button" data-icon="arrow-l" data-theme="c" class="ui-btn ui-btn-icon-right ui-btn-corner-right ui-btn-up-c">';
tpl += ' <span class="ui-btn-inner">';
tpl += ' <span class="ui-btn-text">&nbsp;</span>';
tpl += ' <span class="ui-icon ui-icon-arrow-r ui-icon-shadow">&nbsp;</span>';
Expand Down