|
|
@@ -58,26 +58,26 @@ define(['jquery', 'bootstrap', 'backend', 'form', 'table'], function ($, undefin
|
|
|
bindevent: function () {
|
|
|
Form.api.bindevent($("form[role=form]"));
|
|
|
|
|
|
- // var refreshkey = function (data) {
|
|
|
- // $("input[name='row[price]']").val(data.eventkey).trigger("change");
|
|
|
- // Layer.closeAll();
|
|
|
- // var keytitle = data.text;
|
|
|
- // var cont = $(".clickbox .create-click:first");
|
|
|
- // $(".keytitle", cont).remove();
|
|
|
- // if (keytitle) {
|
|
|
- // cont.append('<div class="keytitle">' + __('Event key') + ':' + keytitle + '</div>');
|
|
|
- // }
|
|
|
- // };
|
|
|
- // $(document).on('click', "#select-resources", function () {
|
|
|
- // var key = $("input[name='row[eventkey]']").val();
|
|
|
- // parent.Backend.api.open($(this).attr("href") + "?key=" + key, __('Select'), {callback: refreshkey});
|
|
|
- // return false;
|
|
|
- // });
|
|
|
- //
|
|
|
- // $(document).on('click', "#add-resources", function () {
|
|
|
- // parent.Backend.api.open($(this).attr("href") + "?key=", __('Add'), {callback: refreshkey});
|
|
|
- // return false;
|
|
|
- // });
|
|
|
+ var refreshkey = function (data) {
|
|
|
+ // $("input[name='row[price]']").val(data.eventkey).trigger("change");
|
|
|
+ Layer.closeAll();
|
|
|
+ var keytitle = data.text;
|
|
|
+ var cont = $(".clickbox .create-click:first");
|
|
|
+ $(".keytitle", cont).remove();
|
|
|
+ if (keytitle) {
|
|
|
+ cont.append('<div class="keytitle">' + __('Event key') + ':' + keytitle + '</div>');
|
|
|
+ }
|
|
|
+ };
|
|
|
+ $(document).on('click', "#select-resources", function () {
|
|
|
+ var key = $("input[name='row[eventkey]']").val();
|
|
|
+ parent.Backend.api.open($(this).attr("href") + "?key=" + key, __('Select'), {callback: refreshkey});
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+
|
|
|
+ $(document).on('click', "#add-resources", function () {
|
|
|
+ parent.Backend.api.open($(this).attr("href") + "?key=", __('Add'), {callback: refreshkey});
|
|
|
+ return false;
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
|