summaryrefslogtreecommitdiff
path: root/views/js
diff options
context:
space:
mode:
Diffstat (limited to 'views/js')
-rw-r--r--views/js/admin.js47
-rw-r--r--views/js/editable.js19
2 files changed, 45 insertions, 21 deletions
diff --git a/views/js/admin.js b/views/js/admin.js
index c7e9276..c0143ce 100644
--- a/views/js/admin.js
+++ b/views/js/admin.js
@@ -147,27 +147,13 @@ function wpsg_in_array(needle, haystack)
}
- jQuery(document).ready(function() {
-
- // Sortierung
- jQuery('th.wpsg_order').bind('click', function() {
-
- var direction = "ASC";
- if (jQuery(this).hasClass('wpsg_order_asc') && jQuery('#wpsg_order').val() == jQuery(this).attr("data-order")) direction = "DESC";
-
- jQuery('#wpsg_ascdesc').val(direction);
- jQuery('#wpsg_order').val(jQuery(this).attr("data-order"));
-
- jQuery('#filter_form').submit();
-
- return false;
-
- } );
-
+ function wpsg_ajaxBind()
+ {
+
// Hilfe Tooltips
- jQuery('*[data-wpsg-tip]').bind('click', function() {
+ jQuery('*[data-wpsg-tip]').on('click', function() {
- jQuery(this).unbind('click');
+ jQuery(this).off('click').on('click', function() { return false; } );
var po = this;
@@ -197,7 +183,26 @@ function wpsg_in_array(needle, haystack)
return false;
} );
-
+
+ }
+
+ jQuery(document).ready(function() {
+
+ // Sortierung
+ jQuery('th.wpsg_order').bind('click', function() {
+
+ var direction = "ASC";
+ if (jQuery(this).hasClass('wpsg_order_asc') && jQuery('#wpsg_order').val() == jQuery(this).attr("data-order")) direction = "DESC";
+
+ jQuery('#wpsg_ascdesc').val(direction);
+ jQuery('#wpsg_order').val(jQuery(this).attr("data-order"));
+
+ jQuery('#filter_form').submit();
+
+ return false;
+
+ } );
+
jQuery('.wpsg_showhide_filter').bind('click', function() {
if (jQuery(this).hasClass('active'))
@@ -216,5 +221,7 @@ function wpsg_in_array(needle, haystack)
}
} );
+
+ wpsg_ajaxBind();
} );
diff --git a/views/js/editable.js b/views/js/editable.js
index 9717064..353c576 100644
--- a/views/js/editable.js
+++ b/views/js/editable.js
@@ -47,6 +47,23 @@
opt.value = value;
}
+ else if (options.type == "select" && typeof options.data == "object")
+ {
+
+ var value = 0;
+ var strValue = jQuery(this).html();
+
+ for (var i in options.data)
+ {
+
+ if (options.data[i] == strValue) value = i;
+
+ }
+
+ opt.source = options.data;
+ opt.value = value
+
+ }
else if (options.type == 'multiarray')
{
@@ -72,7 +89,7 @@
opt.source = ar;
opt.type = 'select';
- }
+ }
else if (options.type == 'string' && typeof options.data == "string")
{