aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2010-11-23 13:50:41 +0000
committerrvelices <rv-github@modusoptimus.com>2010-11-23 13:50:41 +0000
commit8e25506673706ea8b2deeb846e7ff9e8f846183b (patch)
tree0069fa3d3ba253d7af232e0d8852512ea82e39a4
parentb5485d3210f63f2a62c27f72ffa936878a0ff4a3 (diff)
small javascript and css simplification
git-svn-id: http://piwigo.org/svn/trunk@7852 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--admin/themes/default/template/check_integrity.tpl30
-rw-r--r--admin/themes/default/template/notification_by_mail.tpl21
-rw-r--r--themes/default/js/rating.js1
-rw-r--r--themes/default/js/scripts.js32
-rw-r--r--themes/default/print.css4
5 files changed, 50 insertions, 38 deletions
diff --git a/admin/themes/default/template/check_integrity.tpl b/admin/themes/default/template/check_integrity.tpl
index 7cf566123..c935e883c 100644
--- a/admin/themes/default/template/check_integrity.tpl
+++ b/admin/themes/default/template/check_integrity.tpl
@@ -54,9 +54,35 @@
</table>
<p>
+ {literal}
+ <script type="text/javascript">
+ jQuery(document).ready(function(){
+
+ jQuery("#checkAllLink").click(function () {
+ jQuery("#c13y input[type=checkbox]").attr('checked', true);
+ return false;
+ });
+
+ jQuery("#uncheckAllLink").click(function () {
+ jQuery("#c13y input[type=checkbox]").attr('checked', false);
+ return false;
+ });
+
+ });
+ function DeselectAll( formulaire )
+ {
+ var elts = formulaire.elements;
+ for(var i=0; i <elts.length; i++)
+ {
+ if (elts[i].type=='checkbox')
+ elts[i].checked = false;
+ }
+ }
+ </script>
+ {/literal}
{if $c13y_show_submit_ignore}
- <a href="#" onclick="SelectAll(document.getElementById('c13y')); return false;">{'Check all'|@translate}</a>
- / <a href="#" onclick="DeselectAll(document.getElementById('c13y')); return false;">{'Uncheck all'|@translate}</a>
+ <a href="#" id="checkAllLink">{'Check all'|@translate}</a>
+ / <a href="#" id="uncheckAllLink">{'Uncheck all'|@translate}</a>
{/if}
{if isset($c13y_do_check)}
/ <a href="#" onclick="DeselectAll(document.getElementById('c13y'));
diff --git a/admin/themes/default/template/notification_by_mail.tpl b/admin/themes/default/template/notification_by_mail.tpl
index 3ffccd544..b66ca31eb 100644
--- a/admin/themes/default/template/notification_by_mail.tpl
+++ b/admin/themes/default/template/notification_by_mail.tpl
@@ -1,5 +1,22 @@
{include file='include/autosize.inc.tpl'}
+{literal}
+<script type="text/javascript">
+jQuery(document).ready(function(){
+
+ jQuery("#checkAllLink").click(function () {
+ jQuery("#notification_by_mail input[type=checkbox]").attr('checked', true);
+ return false;
+ });
+
+ jQuery("#uncheckAllLink").click(function () {
+ jQuery("#notification_by_mail input[type=checkbox]").attr('checked', false);
+ return false;
+ });
+
+});
+</script>
+{/literal}
<div class="titrePage">
<h2>{'Send mail to users'|@translate} {$TABSHEET_TITLE}</h2>
@@ -97,8 +114,8 @@
{/foreach}
</table>
<p>
- <a href="#" onclick="SelectAll(document.getElementById('notification_by_mail')); return false;">{'Check all'|@translate}</a>
- / <a href="#" onclick="DeselectAll(document.getElementById('notification_by_mail')); return false;">{'Uncheck all'|@translate}</a>
+ <a href="#" id="checkAllLink">{'Check all'|@translate}</a>
+ / <a href="#" id="uncheckAllLink">{'Uncheck all'|@translate}</a>
</p>
</fieldset>
diff --git a/themes/default/js/rating.js b/themes/default/js/rating.js
index 0e3006ec2..f0f838c72 100644
--- a/themes/default/js/rating.js
+++ b/themes/default/js/rating.js
@@ -82,7 +82,6 @@ function updateRating(e)
{
var t = gRatingOptions.ratingSummaryText;
var args =[result.average, result.count], idx = 0, rexp = new RegExp( /%\.?\d*[sdf]/ );
- //_xxx = t.match( rexp );
while (idx<args.length) t=t.replace(rexp, args[idx++]);
gRatingOptions.ratingSummaryElement.innerHTML = t;
}
diff --git a/themes/default/js/scripts.js b/themes/default/js/scripts.js
index 638fccbcf..0447d4c93 100644
--- a/themes/default/js/scripts.js
+++ b/themes/default/js/scripts.js
@@ -1,33 +1,3 @@
-function SelectAll( formulaire )
-{
-var elts = formulaire.elements;
-for(var i=0; i <elts.length; i++)
-{
- if (elts[i].type=='checkbox')
- elts[i].checked = true;
-}
-}
-
-function DeselectAll( formulaire )
-{
-var elts = formulaire.elements;
-for(var i=0; i <elts.length; i++)
-{
- if (elts[i].type=='checkbox')
- elts[i].checked = false;
-}
-}
-
-function Inverser( formulaire )
-{
-var elts = formulaire.elements;
-for(var i=0; i <elts.length; i++)
-{
- if (elts[i].type=='checkbox')
- elts[i].checked = !elts[i].checked;
-}
-}
-
function phpWGOpenWindow(theURL,winName,features)
{
img = new Image();
@@ -62,7 +32,7 @@ function PwgWS(urlRoot)
this.urlRoot = urlRoot;
this.options = {
method: "GET",
- async: true,
+ async: true,
onFailure: null,
onSuccess: null
};
diff --git a/themes/default/print.css b/themes/default/print.css
index 52707ae35..f966d6cfc 100644
--- a/themes/default/print.css
+++ b/themes/default/print.css
@@ -9,6 +9,6 @@ BODY {
background: #fff;
}
-.content {
- margin: 0;
+BODY#theCategoryPage .content {
+ margin: 0 !important;
}