From dec3e3d5ba2ef9a68e574b1e42416a8bd9936e67 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Thu, 08 Jan 2015 03:58:33 -0500
Subject: [PATCH] - Layout fixes
---
interface/web/js/scrigo.js.php | 28 ++++++++++++++++++++++------
1 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/interface/web/js/scrigo.js.php b/interface/web/js/scrigo.js.php
index 85a321c..0c79fc4 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';
@@ -94,7 +93,20 @@
<?php
if($server_config_array['misc']['use_combobox'] == 'y'){
?>
- $('#pageContent').find("select").combobox();
+
+
+ $('#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');
+ }
+ });
+ /* TODO: find a better way! */
+ //$('.chosen-select').chosen({no_results_text: "<?php echo $wb['globalsearch_noresults_text_txt']; ?>", width: '300px'});
<?php
}
?>
@@ -410,7 +422,8 @@
},
success: function(data, textStatus, jqXHR) {
hideLoadIndicator();
- jQuery('#sideNav').html(jqXHR.responseText);
+ jQuery('#sidebar').html(jqXHR.responseText);
+ loadPushyMenu();
},
error: function() {
hideLoadIndicator();
@@ -427,7 +440,8 @@
},
success: function(data, textStatus, jqXHR) {
hideLoadIndicator();
- jQuery('#topNav').html(jqXHR.responseText);
+ jQuery('#topnav-container').html(jqXHR.responseText);
+ loadPushyMenu();
},
error: function(o) {
hideLoadIndicator();
@@ -438,6 +452,8 @@
}
function changeTab(tab,target,force) {
+ if(requestsRunning > 0) return false;
+
//document.forms[0].next_tab.value = tab;
document.pageForm.next_tab.value = tab;
@@ -844,13 +860,13 @@
return Math.floor(Math.random() * (max - min + 1)) + min;
}
-jQuery('.addPlaceholder').live("click", function(){
+jQuery(document).on("click", ".addPlaceholder", function(){
var placeholderText = jQuery(this).text();
var template = jQuery(this).siblings(':input');
template.insertAtCaret(placeholderText);
});
-jQuery('.addPlaceholderContent').live("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