aboutsummaryrefslogtreecommitdiffstats
path: root/template/yoga
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2008-10-10 21:52:00 +0000
committerrub <rub@piwigo.org>2008-10-10 21:52:00 +0000
commit650a40bf78263cced01e9a1101a4d8bd944b388c (patch)
tree2a89d1aae58e18c5f8daa62d756e0a5e1f894fb1 /template/yoga
parentc7523041643b30ceea65ce945a8678c8728a1616 (diff)
jQuery Datepicker:
Move code source to template-common in order to use datepicker on version after butterfly Merge trunk 2703:2704 into branch 2.0 git-svn-id: http://piwigo.org/svn/branches/2.0@2705 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--template/yoga/default-layout.css7
-rw-r--r--template/yoga/icon/datepicker.pngbin0 -> 1047 bytes
-rw-r--r--template/yoga/include/datepicker.inc.tpl19
-rw-r--r--template/yoga/search.tpl17
-rw-r--r--template/yoga/theme/Sylvia/icon/datepicker.pngbin0 -> 430 bytes
5 files changed, 40 insertions, 3 deletions
diff --git a/template/yoga/default-layout.css b/template/yoga/default-layout.css
index 924e901c9..f7b102a96 100644
--- a/template/yoga/default-layout.css
+++ b/template/yoga/default-layout.css
@@ -275,4 +275,9 @@ TABLE.tagLetterContent {
#theHeader {text-align: center;}
#theNotificationPage dl,
-#thePopuphelpPage dl { margin: 0 25px 25px; } \ No newline at end of file
+#thePopuphelpPage dl { margin: 0 25px 25px; }
+
+/* jQuery datepicker */
+img.ui-datepicker-trigger {
+ cursor : pointer;
+}
diff --git a/template/yoga/icon/datepicker.png b/template/yoga/icon/datepicker.png
new file mode 100644
index 000000000..bbb299207
--- /dev/null
+++ b/template/yoga/icon/datepicker.png
Binary files differ
diff --git a/template/yoga/include/datepicker.inc.tpl b/template/yoga/include/datepicker.inc.tpl
new file mode 100644
index 000000000..871be0ea6
--- /dev/null
+++ b/template/yoga/include/datepicker.inc.tpl
@@ -0,0 +1,19 @@
+{* $Id$ *}
+{known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"}
+{known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.core.packed.js"}
+{known_script id="jquery.ui.datepicker" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.datepicker.packed.js"}
+{known_script id="jquery.ui.datepicker-$lang_info.code" src=$ROOT_URL|@cat:"template-common/lib/ui/i18n/ui.datepicker-"|@cat:$lang_info.code|@cat:".js"}
+{known_script id="datepicker.js" src=$ROOT_URL|@cat:"template-common/datepicker.js"}
+
+{html_head}
+<link rel="stylesheet" type="text/css" href="{$ROOT_URL}template-common/lib/ui/ui.datepicker.css">
+{/html_head}
+
+<script type="text/javascript">
+function pwg_initialization_datepicker(day, month, year, linked_date, checked_on_change, min_linked_date, max_linked_date)
+{ldelim}
+ return pwg_common_initialization_datepicker(
+ "{$ROOT_URL}{$themeconf.icon_dir}/datepicker.png",
+ day, month, year, linked_date, checked_on_change, min_linked_date, max_linked_date);
+}
+</script>
diff --git a/template/yoga/search.tpl b/template/yoga/search.tpl
index 4f6ba4455..8562cac3d 100644
--- a/template/yoga/search.tpl
+++ b/template/yoga/search.tpl
@@ -1,4 +1,17 @@
{* $Id$ *}
+
+{* Example of datepicker
+{include file='include/datepicker.inc.tpl'}
+
+{literal}
+<script type="text/javascript">
+ pwg_initialization_datepicker("#start_day", "#start_month", "#start_year", "#start_linked_date", null, null, "#end_linked_date");
+ pwg_initialization_datepicker("#end_day", "#end_month", "#end_year", "#end_linked_date", null, "#start_linked_date", null);
+ jQuery().ready(function(){ $(".date_today").hide(); });
+</script>
+{/literal}
+*}
+
<div id="content" class="content">
<div class="titrePage">
@@ -74,7 +87,7 @@
<input id="start_linked_date" name="start_linked_date" type="hidden" size="10" disabled="disabled"/>
</li>
<li>
- <a href="#" onClick="document.search.start_day.value={$smarty.now|date_format:"%d"};document.search.start_month.value={$smarty.now|date_format:"%m"};document.search.start_year.value={$smarty.now|date_format:"%Y"};return false;">{'today'|@translate}</a>
+ <a class="date_today" href="#" onClick="document.search.start_day.value={$smarty.now|date_format:"%d"};document.search.start_month.value={$smarty.now|date_format:"%m"};document.search.start_year.value={$smarty.now|date_format:"%Y"};return false;">{'today'|@translate}</a>
</li>
</ul>
<ul>
@@ -93,7 +106,7 @@
<input id="end_linked_date" name="end_linked_date" type="hidden" size="10" disabled="disabled"/>
</li>
<li>
- <a href="#" onClick="document.search.end_day.value={$smarty.now|date_format:"%d"};document.search.end_month.value={$smarty.now|date_format:"%m"};document.search.end_year.value={$smarty.now|date_format:"%Y"};return false;">{'today'|@translate}</a>
+ <a class="date_today" href="#" onClick="document.search.end_day.value={$smarty.now|date_format:"%d"};document.search.end_month.value={$smarty.now|date_format:"%m"};document.search.end_year.value={$smarty.now|date_format:"%Y"};return false;">{'today'|@translate}</a>
</li>
</ul>
</fieldset>
diff --git a/template/yoga/theme/Sylvia/icon/datepicker.png b/template/yoga/theme/Sylvia/icon/datepicker.png
new file mode 100644
index 000000000..3d0e015f6
--- /dev/null
+++ b/template/yoga/theme/Sylvia/icon/datepicker.png
Binary files differ