diff options
author | rvelices <rv-github@modusoptimus.com> | 2007-02-14 00:36:34 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2007-02-14 00:36:34 +0000 |
commit | 711ebcbf2c1906b6496711eb6973954ecb113d72 (patch) | |
tree | 625490d68f96f6aba3f93c484f6208e10cc9f3b8 /template | |
parent | 03911f5aa32d4dd65d85b7dd81379fedd27bbef5 (diff) |
- thumbnails creation for all local sites (not only site id 1)
- urls for images in notification (rss & mail) is now correct
- removed "Recent pictures" from title in when the flat view is in effect
- removed unnecessary class="" from comments.tpl
- english language correction
- removed unused web service files
- set rating star button left & right margin to 0 (javascript)
- admin menu - put site manager and synchronize together
git-svn-id: http://piwigo.org/svn/trunk@1814 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | template/yoga/admin.tpl | 4 | ||||
-rw-r--r-- | template/yoga/comments.tpl | 2 | ||||
-rw-r--r-- | template/yoga/rating.js | 174 |
3 files changed, 91 insertions, 89 deletions
diff --git a/template/yoga/admin.tpl b/template/yoga/admin.tpl index 9da560996..3dca4cbf6 100644 --- a/template/yoga/admin.tpl +++ b/template/yoga/admin.tpl @@ -15,7 +15,7 @@ <ul> <li><a href="{U_FAQ}">{lang:instructions}</a></li> <li><a href="{U_SITE_MANAGER}">{lang:Site manager}</a></li> - + <li><a href="{U_CAT_UPDATE}">{lang:update}</a></li> <li> {lang:history} <ul> @@ -23,8 +23,6 @@ <li><a href="{U_HISTORY_SEARCH}">{lang:Search}</a></li> </ul> </li> - - <li><a href="{U_CAT_UPDATE}">{lang:update}</a></li> </ul> </dd> </dl> diff --git a/template/yoga/comments.tpl b/template/yoga/comments.tpl index 4812d6fa4..c175224b6 100644 --- a/template/yoga/comments.tpl +++ b/template/yoga/comments.tpl @@ -21,7 +21,7 @@ {lang:Category} <select name="cat"> <!-- BEGIN category --> - <option class="{category.CLASS}" {category.SELECTED} value="{category.VALUE}">{category.OPTION}</option> + <option {category.SELECTED} value="{category.VALUE}">{category.OPTION}</option> <!-- END category --> </select> </label> diff --git a/template/yoga/rating.js b/template/yoga/rating.js index e934bb858..a4f8f86b8 100644 --- a/template/yoga/rating.js +++ b/template/yoga/rating.js @@ -1,86 +1,90 @@ -makeNiceRatingForm();
-
-function makeNiceRatingForm()
-{
- var form = document.getElementById('rateForm');
- if (!form) return; //? template changed
- gRatingButtons = form.getElementsByTagName('input');
-
- gUserRating = "";
- for (var i=0; i<gRatingButtons.length; i++)
- {
- if ( gRatingButtons[i].type=="button" )
- {
- gUserRating = gRatingButtons[i].value;
- break;
- }
- }
-
- for (var i=0; i<gRatingButtons.length; i++)
- {
- var rateButton = gRatingButtons[i];
- rateButton.initialRateValue = rateButton.value; // save it as a property
-
- rateButton.value = ""; //hide the text IE/Opera
- rateButton.style.textIndent = "-50px"; //hide the text FF
-
- if (i!=gRatingButtons.length-1 && rateButton.nextSibling.nodeType == 3 /*TEXT_NODE*/)
- rateButton.parentNode.removeChild(rateButton.nextSibling);
- if (i>0 && rateButton.previousSibling.nodeType == 3 /*TEXT_NODE*/)
- rateButton.parentNode.removeChild(rateButton.previousSibling);
-
- if(window.addEventListener){ // Mozilla, Netscape, Firefox
- rateButton.addEventListener("click", updateRating, false );
- rateButton.addEventListener("mouseout", resetRatingStarDisplay, false );
- rateButton.addEventListener("mouseover", updateRatingStarDisplayEvt, false );
- }
- else if(window.attachEvent) { // IE
- rateButton.attachEvent("onclick", updateRating);
- rateButton.attachEvent("onmouseout", resetRatingStarDisplay);
- rateButton.attachEvent("onmouseover", updateRatingStarDisplayEvt);
- }
- }
- resetRatingStarDisplay();
-}
-
-function resetRatingStarDisplay()
-{
- updateRatingStarDisplay( gUserRating );
-}
-
-function updateRatingStarDisplay(userRating)
-{
- for (i=0; i<gRatingButtons.length; i++)
- {
- var rateButton = gRatingButtons[i];
- if (userRating!=="" && userRating>=rateButton.initialRateValue )
- {
- rateButton.className = "rateButtonStarFull";
- }
- else
- {
- rateButton.className = "rateButtonStarEmpty";
- }
- }
-}
-
-function updateRatingStarDisplayEvt(e)
-{
- if (e.target)
- updateRatingStarDisplay(e.target.initialRateValue);
- else //IE
- updateRatingStarDisplay(e.srcElement.initialRateValue);
-}
-
-function updateRating(e)
-{
- if (e.target)
- var rateButton = e.target;
- else //IE
- var rateButton = e.srcElement;
- if (rateButton.initialRateValue == gUserRating)
- return false; //nothing to do
- // some ajax here one day would be nice
- rateButton.value = rateButton.initialRateValue; // put back real value
- return true;
+makeNiceRatingForm(); + +function makeNiceRatingForm() +{ + var form = document.getElementById('rateForm'); + if (!form) return; //? template changed + gRatingButtons = form.getElementsByTagName('input'); + + gUserRating = ""; + for (var i=0; i<gRatingButtons.length; i++) + { + if ( gRatingButtons[i].type=="button" ) + { + gUserRating = gRatingButtons[i].value; + break; + } + } + + for (var i=0; i<gRatingButtons.length; i++) + { + var rateButton = gRatingButtons[i]; + rateButton.initialRateValue = rateButton.value; // save it as a property + + rateButton.value = ""; //hide the text IE/Opera + with (rateButton.style) + { + textIndent = "-50px"; //hide the text FF + marginLeft = marginRight = 0; + } + + if (i!=gRatingButtons.length-1 && rateButton.nextSibling.nodeType == 3 /*TEXT_NODE*/) + rateButton.parentNode.removeChild(rateButton.nextSibling); + if (i>0 && rateButton.previousSibling.nodeType == 3 /*TEXT_NODE*/) + rateButton.parentNode.removeChild(rateButton.previousSibling); + + if(window.addEventListener){ // Mozilla, Netscape, Firefox + rateButton.addEventListener("click", updateRating, false ); + rateButton.addEventListener("mouseout", resetRatingStarDisplay, false ); + rateButton.addEventListener("mouseover", updateRatingStarDisplayEvt, false ); + } + else if(window.attachEvent) { // IE + rateButton.attachEvent("onclick", updateRating); + rateButton.attachEvent("onmouseout", resetRatingStarDisplay); + rateButton.attachEvent("onmouseover", updateRatingStarDisplayEvt); + } + } + resetRatingStarDisplay(); +} + +function resetRatingStarDisplay() +{ + updateRatingStarDisplay( gUserRating ); +} + +function updateRatingStarDisplay(userRating) +{ + for (i=0; i<gRatingButtons.length; i++) + { + var rateButton = gRatingButtons[i]; + if (userRating!=="" && userRating>=rateButton.initialRateValue ) + { + rateButton.className = "rateButtonStarFull"; + } + else + { + rateButton.className = "rateButtonStarEmpty"; + } + } +} + +function updateRatingStarDisplayEvt(e) +{ + if (e.target) + updateRatingStarDisplay(e.target.initialRateValue); + else //IE + updateRatingStarDisplay(e.srcElement.initialRateValue); +} + +function updateRating(e) +{ + if (e.target) + var rateButton = e.target; + else //IE + var rateButton = e.srcElement; + if (rateButton.initialRateValue == gUserRating) + return false; //nothing to do + // some ajax here one day would be nice + rateButton.value = rateButton.initialRateValue; // put back real value + return true; }
\ No newline at end of file |