From 989b39b6282f349bf78ef5de5ebf07271d86b02a Mon Sep 17 00:00:00 2001 From: mcramer <m.cramer@pixcept.de> Date: Wed, 12 Sep 2012 06:29:12 -0400 Subject: [PATCH] Bugfix: Database Update through remoting api --- interface/web/js/scrigo.js.php | 47 ++++++++++++++++++++++++++++++++--------------- 1 files changed, 32 insertions(+), 15 deletions(-) diff --git a/interface/web/js/scrigo.js.php b/interface/web/js/scrigo.js.php index 4146127..caa717e 100644 --- a/interface/web/js/scrigo.js.php +++ b/interface/web/js/scrigo.js.php @@ -32,7 +32,7 @@ }, error: function() { reportError('Ajax Request was not successful.'+pagename); - }, + } }); setTimeout( "loadContentRefresh('"+pagename+"&refresh="+document.getElementById('refreshinterval').value+"')", document.getElementById('refreshinterval').value*1000 ); } @@ -59,7 +59,7 @@ }, error: function() { reportError('Ajax Request was not successful.'+module); - }, + } }); } @@ -98,7 +98,7 @@ }, error: function() { reportError('Ajax Request was not successful.110'); - }, + } }); /* if(redirect != '') { @@ -130,7 +130,7 @@ error: function(jqXHR, textStatus, errorThrown) { var parts = jqXHR.responseText.split(':'); reportError('Ajax Request was not successful. 111'); - }, + } }); /* if(redirect != '') { @@ -163,7 +163,7 @@ error: function(jqXHR, textStatus, errorThrown) { var parts = jqXHR.responseText.split(':'); reportError('Ajax Request was not successful. 111'); - }, + } }); } } @@ -237,7 +237,7 @@ }, error: function() { reportError('Ajax Request was not successful. 113'); - }, + } }); } @@ -258,7 +258,7 @@ }, error: function() { reportError('Ajax Request was not successful. 114'); - }, + } }); loadMenus(); @@ -269,7 +269,7 @@ function setFocus() { try { - document.pageForm.username.focus(); + jQuery('form#pageForm').find('input[name="username"]').focus(); } catch (e) { } } @@ -285,7 +285,7 @@ }, error: function() { reportError('Ajax Request was not successful. 115'); - }, + } }); var topNavObject = jQuery.ajax({ type: "GET", @@ -297,7 +297,7 @@ }, error: function(o) { reportError('Ajax Request was not successful. 116'); - }, + } }); } @@ -353,7 +353,7 @@ }, error: function() { reportError('Ajax Request was not successful. 118'); - }, + } }); } @@ -376,7 +376,7 @@ }, error: function() { reportError('Ajax Request was not successful. 119'); - }, + } }); } @@ -389,7 +389,7 @@ }, error: function() { reportError('Session expired. Please login again.'); - }, + } }); //setTimeout( keepalive, 1000000 ); } @@ -601,6 +601,8 @@ newPWField.attr('id', passwordFieldID).val(pword).trigger('keyup'); } +var funcDisableClick = function(e) { e.preventDefault(); return false; }; + function checkPassMatch(pwField1,pwField2){ var rpass = jQuery('#'+pwField2).val(); var npass = jQuery('#'+pwField1).val(); @@ -608,13 +610,22 @@ jQuery('#confirmpasswordOK').hide(); jQuery('#confirmpasswordError').show(); jQuery('button.positive').attr('disabled','disabled'); - jQuery('.tabbox_tabs ul li a').attr('onclick','return false;'); + jQuery('.tabbox_tabs ul li a').each(function() { + var $this = $(this); + $this.data('saved_onclick', $this.attr('onclick')); + $this.removeAttr('onclick'); + $this.click(funcDisableClick); + }); return false; } else { jQuery('#confirmpasswordError').hide(); jQuery('#confirmpasswordOK').show(); jQuery('button.positive').removeAttr('disabled'); - jQuery('.tabbox_tabs ul li a').removeAttr('onclick'); + jQuery('.tabbox_tabs ul li a').each(function() { + var $this = $(this); + $this.unbind('click', funcDisableClick); + if($this.data('saved_onclick') && !$this.attr('onclick')) $this.attr('onclick', $this.data('saved_onclick')); + }); } } @@ -627,6 +638,12 @@ var template = jQuery(this).siblings(':input'); template.insertAtCaret(placeholderText); }); + +jQuery('.addPlaceholderContent').live("click", function(){ + var placeholderContentText = jQuery(this).find('.addPlaceholderContent').text(); + var template2 = jQuery(this).siblings(':input'); + template2.insertAtCaret(placeholderContentText); +}); jQuery.fn.extend({ insertAtCaret: function(myValue){ -- Gitblit v1.9.1