From 8ceb0824027750b720f7788e44ed0deb87be6f08 Mon Sep 17 00:00:00 2001 From: Marius Cramer <m.cramer@pixcept.de> Date: Wed, 07 Jan 2015 07:52:03 -0500 Subject: [PATCH] - Layout fixes - Included new icons and buttons - Layout scaling improved (up to 1260px width) --- interface/web/js/scrigo.js.php | 29 +++++++++++++++++------------ 1 files changed, 17 insertions(+), 12 deletions(-) diff --git a/interface/web/js/scrigo.js.php b/interface/web/js/scrigo.js.php index d0585ad..1445353 100644 --- a/interface/web/js/scrigo.js.php +++ b/interface/web/js/scrigo.js.php @@ -1,5 +1,4 @@ <?php -session_start(); include '../../lib/config.inc.php'; header('Content-Type: text/javascript; charset=utf-8'); // the config file sets the content type header so we have to override it here! require_once '../../lib/app.inc.php'; @@ -96,14 +95,18 @@ ?> - $('#pageContent').find("select:not(.chosen-select)").combobox({ - select: function (event, ui) { - if (jQuery(".panel #Filter").length > 0) { - jQuery(".panel #Filter").trigger('click'); + $('#pageContent').find("select:not(.chosen-select)").select2({ + placeholder: '', + width: 'element', + selectOnBlur: true, + allowClear: true, + }).on('change', function(e) { + if (jQuery("#pageForm .table #Filter").length > 0) { + jQuery("#pageForm .table #Filter").trigger('click'); } - } }); - $('.chosen-select').chosen({no_results_text: "<?php echo $wb['globalsearch_noresults_text_txt']; ?>", width: '300px'}); + /* TODO: find a better way! */ + //$('.chosen-select').chosen({no_results_text: "<?php echo $wb['globalsearch_noresults_text_txt']; ?>", width: '300px'}); <?php } ?> @@ -419,7 +422,7 @@ }, success: function(data, textStatus, jqXHR) { hideLoadIndicator(); - jQuery('#sideNav').html(jqXHR.responseText); + jQuery('#sidebar').html(jqXHR.responseText); }, error: function() { hideLoadIndicator(); @@ -436,7 +439,7 @@ }, success: function(data, textStatus, jqXHR) { hideLoadIndicator(); - jQuery('#topNav').html(jqXHR.responseText); + jQuery('#topnav-container').html(jqXHR.responseText); }, error: function(o) { hideLoadIndicator(); @@ -447,6 +450,8 @@ } function changeTab(tab,target,force) { + if(requestsRunning > 0) return false; + //document.forms[0].next_tab.value = tab; document.pageForm.next_tab.value = tab; @@ -818,7 +823,7 @@ oldPWField.remove(); var pword = password(<?php echo $min_password_length; ?>, false, 1); jQuery('#'+repeatPasswordFieldID).val(pword); - newPWField.attr('id', passwordFieldID).val(pword).trigger('keyup'); + newPWField.attr('id', passwordFieldID).val(pword).trigger('keyup').select(); } var funcDisableClick = function(e) { e.preventDefault(); return false; }; @@ -853,13 +858,13 @@ return Math.floor(Math.random() * (max - min + 1)) + min; } -jQuery('.addPlaceholder').on("click", function(){ +jQuery(document).on("click", ".addPlaceholder", function(){ var placeholderText = jQuery(this).text(); var template = jQuery(this).siblings(':input'); template.insertAtCaret(placeholderText); }); -jQuery('.addPlaceholderContent').on("click", function(){ +jQuery(document).on("click", ".addPlaceholderContent", function(){ var placeholderContentText = jQuery(this).find('.addPlaceholderContent').text(); var template2 = jQuery(this).siblings(':input'); template2.insertAtCaret(placeholderContentText); -- Gitblit v1.9.1