+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/root/metadata/metatable/list.html b/root/metadata/metatable/list.html
new file mode 100644
index 0000000..f681639
--- /dev/null
+++ b/root/metadata/metatable/list.html
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
操作
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/root/metadata/metatable/metaTable.html b/root/metadata/metatable/metaTable.html
new file mode 100644
index 0000000..25db513
--- /dev/null
+++ b/root/metadata/metatable/metaTable.html
@@ -0,0 +1,573 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
字段名
+
中文名
+
数据类型
+
输入类型
+
附加属性
+
备注
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
字段名
+
中文名
+
展示名
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
列表展示的属性
+
+
+
+
+
+
字段名
+
中文名
+
+
+
+
+
+
+
+
+
+
{{getFieldLabel(item)}}
+
+
+
+
+
+
+
+
+
+
+
+
导出的属性配置
+
+
+
+
+
+
字段名
+
中文名
+
+
+
+
+
+
+
+
+
+
{{getFieldLabel(item)}}
+
+
+
+
+
+
+
+
+
+
+
+
+ 导入的属性配置
+
+
+
+
+
+
+
字段名
+
中文名
+
+
+
+
+
+
+
+
+
+
{{getFieldLabel(item)}}
+
+
+
+
+
+
+
+
+
+
+
+
查询配置
+
+
+
+
+
+
字段名
+
中文名
+
默认展示
+
支持查询类型
+
+
+
+
+
+
+
+
+
{{getFieldLabel(item.name)}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
数据平台配置
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/root/plat/db.html b/root/plat/db.html
new file mode 100644
index 0000000..cb339fd
--- /dev/null
+++ b/root/plat/db.html
@@ -0,0 +1,229 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/root/plat/dev.html b/root/plat/dev.html
new file mode 100644
index 0000000..d95a645
--- /dev/null
+++ b/root/plat/dev.html
@@ -0,0 +1,5 @@
+
+
+ sdaf
+
+
\ No newline at end of file
diff --git a/root/plat/index.html b/root/plat/index.html
new file mode 100644
index 0000000..d95175a
--- /dev/null
+++ b/root/plat/index.html
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/root/qtask/abc.html b/root/qtask/abc.html
new file mode 100644
index 0000000..dc4d906
--- /dev/null
+++ b/root/qtask/abc.html
@@ -0,0 +1,24 @@
+
+ {{cfg.title}}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/root/qtask/ddl.html b/root/qtask/ddl.html
new file mode 100644
index 0000000..252884b
--- /dev/null
+++ b/root/qtask/ddl.html
@@ -0,0 +1,143 @@
+
+
+
+
导出数据库表结构(导出后使用wps打开)
+
+
+
+
+
最近使用记录 共 {{logs.total}} 条记录
+
+
+
+
IP
+
最后时间
+
最后导出数据类型
+
导出总次数
+
+
+
+
+
+
+
+
+
+
+
合计总人数
+
{{logs.userTotal}}
+
合计总次数
+
{{logs.total}}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/root/qtask/debug.html b/root/qtask/debug.html
new file mode 100644
index 0000000..e9cba61
--- /dev/null
+++ b/root/qtask/debug.html
@@ -0,0 +1,131 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/root/qtask/list.html b/root/qtask/list.html
new file mode 100644
index 0000000..35e4f54
--- /dev/null
+++ b/root/qtask/list.html
@@ -0,0 +1,237 @@
+
+
'.format(a)).append(''.format(a))}),this.bind()},o.prototype.bind=function(o){var a=this.$,i=this.options;a.droppable(t.extend({before:i.before,target:'.board-item:not(".disable-drop, .board-item-shadow")',flex:!0,selector:'.board-item:not(".disable-drop, .board-item-shadow")',start:function(t){a.addClass("dragging").find(".board-item-shadow").height(t.element.outerHeight())},drag:function(t){if(a.find(".board.drop-in-empty").removeClass("drop-in-empty"),t.isIn){var o=t.target.closest(".board").addClass("drop-in"),i=o.find(".board-item-shadow"),e=t.target;a.addClass("drop-in").find(".board.drop-in").not(o).removeClass("drop-in"),i.insertBefore(e),o.toggleClass("drop-in-empty",e.hasClass("board-item-empty"))}},drop:function(o){if(o.isNew){var a;t.isFunction(i.drop)&&(a=i.drop(o)),a!==!1&&o.element.insertBefore(o.target)}},finish:function(){a.removeClass("dragging").removeClass("drop-in").find(".board.drop-in").removeClass("drop-in")}},i.droppable))},t.fn.boards=function(a){return this.each(function(){var i=t(this),e=i.data("zui.boards"),n="object"==typeof a&&a;e||i.data("zui.boards",e=new o(this,n)),"string"==typeof a&&e[a]()})},t.fn.boards.Constructor=o}(jQuery);
\ No newline at end of file
diff --git a/root/res/zui/lib/bootbox/bootbox.css b/root/res/zui/lib/bootbox/bootbox.css
new file mode 100644
index 0000000..bc82d65
--- /dev/null
+++ b/root/res/zui/lib/bootbox/bootbox.css
@@ -0,0 +1,3 @@
+.bootbox.modal .modal-dialog {
+ width: 400px;
+ }
diff --git a/root/res/zui/lib/bootbox/bootbox.js b/root/res/zui/lib/bootbox/bootbox.js
new file mode 100644
index 0000000..af8a6ff
--- /dev/null
+++ b/root/res/zui/lib/bootbox/bootbox.js
@@ -0,0 +1,847 @@
+/* ========================================================================
+ * Bootbox: bootbox.js [v4.4.0]
+ * http://bootboxjs.com/
+ *
+ * ZUI: The file has been changed in ZUI. It will not keep update with the
+ * official version in the future.
+ * http://zui.sexy
+ * ========================================================================
+ * http://bootboxjs.com/license.txt
+ * Improvement in ZUI:
+ * 1. Determine client language and apply setting automatically.
+ * 2. Changed button position.
+ * ======================================================================== */
+
+/*! bootbox.js v4.4.0 http://bootboxjs.com/license.txt */
+
+// @see https://github.com/makeusabrew/bootbox/issues/180
+// @see https://github.com/makeusabrew/bootbox/issues/186
+(function(root, factory) {
+
+ 'use strict';
+ if(typeof define === "function" && define.amd) {
+ // AMD. Register as an anonymous module.
+ define(["jquery"], factory);
+ } else if(typeof exports === "object") {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ // Browser globals (root is window)
+ root.bootbox = factory(root.jQuery);
+ }
+
+}(this, function init($, undefined) {
+
+ 'use strict';
+
+ // the base DOM structure needed to create a modal
+ var templates = {
+ dialog: "
" +
+ "
" +
+ "
" +
+ "
" +
+ "
" +
+ "
" +
+ "
",
+ header: "
" +
+ "" +
+ "
",
+ footer: "",
+ closeButton: "",
+ form: "",
+ inputs: {
+ text: "",
+ textarea: "",
+ email: "",
+ select: "",
+ checkbox: "",
+ date: "",
+ time: "",
+ number: "",
+ password: ""
+ }
+ };
+
+ var defaults = {
+ // default language
+ locale: $.zui && $.zui.clientLang ? $.zui.clientLang() : 'zh_cn',
+ // show backdrop or not. Default to static so user has to interact with dialog
+ backdrop: "static",
+ // animate the modal in/out
+ animate: true,
+ // additional class string applied to the top level dialog
+ className: null,
+ // whether or not to include a close button
+ closeButton: true,
+ // show the dialog immediately by default
+ show: true,
+ // dialog container
+ container: "body"
+ };
+
+ // our public object; augmented after our private API
+ var exports = {};
+
+ /**
+ * @private
+ */
+ function _t(key) {
+ var locale = locales[defaults.locale];
+ return locale ? locale[key] : locales.en[key];
+ }
+
+ function processCallback(e, dialog, callback) {
+ e.stopPropagation();
+ e.preventDefault();
+
+ // by default we assume a callback will get rid of the dialog,
+ // although it is given the opportunity to override this
+
+ // so, if the callback can be invoked and it *explicitly returns false*
+ // then we'll set a flag to keep the dialog active...
+ var preserveDialog = $.isFunction(callback) && callback.call(dialog, e) === false;
+
+ // ... otherwise we'll bin it
+ if(!preserveDialog) {
+ dialog.modal("hide");
+ }
+ }
+
+ function getKeyLength(obj) {
+ // @TODO defer to Object.keys(x).length if available?
+ var k, t = 0;
+ for(k in obj) {
+ t++;
+ }
+ return t;
+ }
+
+ function each(collection, iterator) {
+ var index = 0;
+ $.each(collection, function(key, value) {
+ iterator(key, value, index++);
+ });
+ }
+
+ function sanitize(options) {
+ var buttons;
+ var total;
+
+ if(typeof options !== "object") {
+ throw new Error("Please supply an object of options");
+ }
+
+ if(!options.message) {
+ throw new Error("Please specify a message");
+ }
+
+ // make sure any supplied options take precedence over defaults
+ options = $.extend({}, defaults, options);
+
+ if(!options.buttons) {
+ options.buttons = {};
+ }
+
+ buttons = options.buttons;
+
+ total = getKeyLength(buttons);
+
+ each(buttons, function(key, button, index) {
+
+ if($.isFunction(button)) {
+ // short form, assume value is our callback. Since button
+ // isn't an object it isn't a reference either so re-assign it
+ button = buttons[key] = {
+ callback: button
+ };
+ }
+
+ // before any further checks make sure by now button is the correct type
+ if($.type(button) !== "object") {
+ throw new Error("button with key " + key + " must be an object");
+ }
+
+ if(!button.label) {
+ // the lack of an explicit label means we'll assume the key is good enough
+ button.label = key;
+ }
+
+ if(!button.className) {
+ if((total === 2 && (key === 'ok' || key === 'confirm')) || total === 1) {
+ // always add a primary to the main option in a two-button dialog
+ button.className = "btn-primary";
+ } else {
+ button.className = "btn-default";
+ }
+ }
+ });
+
+ return options;
+ }
+
+ /**
+ * map a flexible set of arguments into a single returned object
+ * if args.length is already one just return it, otherwise
+ * use the properties argument to map the unnamed args to
+ * object properties
+ * so in the latter case:
+ * mapArguments(["foo", $.noop], ["message", "callback"])
+ * -> { message: "foo", callback: $.noop }
+ */
+ function mapArguments(args, properties) {
+ var argn = args.length;
+ var options = {};
+
+ if(argn < 1 || argn > 2) {
+ throw new Error("Invalid argument length");
+ }
+
+ if(argn === 2 || typeof args[0] === "string") {
+ options[properties[0]] = args[0];
+ options[properties[1]] = args[1];
+ } else {
+ options = args[0];
+ }
+
+ return options;
+ }
+
+ /**
+ * merge a set of default dialog options with user supplied arguments
+ */
+ function mergeArguments(defaults, args, properties) {
+ return $.extend(
+ // deep merge
+ true,
+ // ensure the target is an empty, unreferenced object
+ {},
+ // the base options object for this type of dialog (often just buttons)
+ defaults,
+ // args could be an object or array; if it's an array properties will
+ // map it to a proper options object
+ mapArguments(
+ args,
+ properties
+ )
+ );
+ }
+
+ /**
+ * this entry-level method makes heavy use of composition to take a simple
+ * range of inputs and return valid options suitable for passing to bootbox.dialog
+ */
+ function mergeDialogOptions(className, labels, properties, args) {
+ // build up a base set of dialog properties
+ var baseOptions = {
+ className: "bootbox-" + className,
+ buttons: createLabels.apply(null, labels)
+ };
+
+ // ensure the buttons properties generated, *after* merging
+ // with user args are still valid against the supplied labels
+ return validateButtons(
+ // merge the generated base properties with user supplied arguments
+ mergeArguments(
+ baseOptions,
+ args,
+ // if args.length > 1, properties specify how each arg maps to an object key
+ properties
+ ),
+ labels
+ );
+ }
+
+ /**
+ * from a given list of arguments return a suitable object of button labels
+ * all this does is normalise the given labels and translate them where possible
+ * e.g. "ok", "confirm" -> { ok: "OK, cancel: "Annuleren" }
+ */
+ function createLabels() {
+ var buttons = {};
+
+ for(var i = 0, j = arguments.length; i < j; i++) {
+ var argument = arguments[i];
+ var key = argument.toLowerCase();
+ var value = argument.toUpperCase();
+
+ buttons[key] = {
+ label: _t(value)
+ };
+ }
+
+ return buttons;
+ }
+
+ function validateButtons(options, buttons) {
+ var allowedButtons = {};
+ each(buttons, function(key, value) {
+ allowedButtons[value] = true;
+ });
+
+ each(options.buttons, function(key) {
+ if(allowedButtons[key] === undefined) {
+ throw new Error("button key " + key + " is not allowed (options are " + buttons.join("\n") + ")");
+ }
+ });
+
+ return options;
+ }
+
+ exports.alert = function() {
+ var options;
+
+ options = mergeDialogOptions("alert", ["ok"], ["message", "callback"], arguments);
+
+ if(options.callback && !$.isFunction(options.callback)) {
+ throw new Error("alert requires callback property to be a function when provided");
+ }
+
+ /**
+ * overrides
+ */
+ options.buttons.ok.callback = options.onEscape = function() {
+ if($.isFunction(options.callback)) {
+ return options.callback.call(this);
+ }
+ return true;
+ };
+
+ return exports.dialog(options);
+ };
+
+ exports.confirm = function() {
+ var options;
+
+ // ZUI change begin
+ options = mergeDialogOptions("confirm", ["confirm", "cancel"], ["message", "callback"], arguments);
+ // OLD WAY: options = mergeDialogOptions("confirm", ["cancel", "confirm"], ["message", "callback"], arguments);
+ // ZUI change end
+
+ /**
+ * overrides; undo anything the user tried to set they shouldn't have
+ */
+ options.buttons.cancel.callback = options.onEscape = function() {
+ return options.callback.call(this, false);
+ };
+
+ options.buttons.confirm.callback = function() {
+ return options.callback.call(this, true);
+ };
+
+ // confirm specific validation
+ if(!$.isFunction(options.callback)) {
+ throw new Error("confirm requires a callback");
+ }
+
+ return exports.dialog(options);
+ };
+
+ exports.prompt = function() {
+ var options;
+ var defaults;
+ var dialog;
+ var form;
+ var input;
+ var shouldShow;
+ var inputOptions;
+
+ // we have to create our form first otherwise
+ // its value is undefined when gearing up our options
+ // @TODO this could be solved by allowing message to
+ // be a function instead...
+ form = $(templates.form);
+
+ // prompt defaults are more complex than others in that
+ // users can override more defaults
+ // @TODO I don't like that prompt has to do a lot of heavy
+ // lifting which mergeDialogOptions can *almost* support already
+ // just because of 'value' and 'inputType' - can we refactor?
+ defaults = {
+ className: "bootbox-prompt",
+ buttons: createLabels("cancel", "confirm"),
+ value: "",
+ inputType: "text"
+ };
+
+ options = validateButtons(
+ // ZUI change begin
+ mergeArguments(defaults, arguments, ["title", "callback"]), ["confirm", "cancel"]
+ // OLD WAY: mergeArguments(defaults, arguments, ["title", "callback"]), ["cancel", "confirm"]arguments);
+ // ZUI change end
+ );
+
+ // capture the user's show value; we always set this to false before
+ // spawning the dialog to give us a chance to attach some handlers to
+ // it, but we need to make sure we respect a preference not to show it
+ shouldShow = (options.show === undefined) ? true : options.show;
+
+ /**
+ * overrides; undo anything the user tried to set they shouldn't have
+ */
+ options.message = form;
+
+ options.buttons.cancel.callback = options.onEscape = function() {
+ return options.callback.call(this, null);
+ };
+
+ options.buttons.confirm.callback = function() {
+ var value;
+
+ switch(options.inputType) {
+ case "text":
+ case "textarea":
+ case "email":
+ case "select":
+ case "date":
+ case "time":
+ case "number":
+ case "password":
+ value = input.val();
+ break;
+
+ case "checkbox":
+ var checkedItems = input.find("input:checked");
+
+ // we assume that checkboxes are always multiple,
+ // hence we default to an empty array
+ value = [];
+
+ each(checkedItems, function(_, item) {
+ value.push($(item).val());
+ });
+ break;
+ }
+
+ return options.callback.call(this, value);
+ };
+
+ options.show = false;
+
+ // prompt specific validation
+ if(!options.title) {
+ throw new Error("prompt requires a title");
+ }
+
+ if(!$.isFunction(options.callback)) {
+ throw new Error("prompt requires a callback");
+ }
+
+ if(!templates.inputs[options.inputType]) {
+ throw new Error("invalid prompt type");
+ }
+
+ // create the input based on the supplied type
+ input = $(templates.inputs[options.inputType]);
+
+ switch(options.inputType) {
+ case "text":
+ case "textarea":
+ case "email":
+ case "date":
+ case "time":
+ case "number":
+ case "password":
+ input.val(options.value);
+ break;
+
+ case "select":
+ var groups = {};
+ inputOptions = options.inputOptions || [];
+
+ if(!$.isArray(inputOptions)) {
+ throw new Error("Please pass an array of input options");
+ }
+
+ if(!inputOptions.length) {
+ throw new Error("prompt with select requires options");
+ }
+
+ each(inputOptions, function(_, option) {
+
+ // assume the element to attach to is the input...
+ var elem = input;
+
+ if(option.value === undefined || option.text === undefined) {
+ throw new Error("given options in wrong format");
+ }
+
+ // ... but override that element if this option sits in a group
+
+ if(option.group) {
+ // initialise group if necessary
+ if(!groups[option.group]) {
+ groups[option.group] = $("").attr("label", option.group);
+ }
+
+ elem = groups[option.group];
+ }
+
+ elem.append("");
+ });
+
+ each(groups, function(_, group) {
+ input.append(group);
+ });
+
+ // safe to set a select's value as per a normal input
+ input.val(options.value);
+ break;
+
+ case "checkbox":
+ var values = $.isArray(options.value) ? options.value : [options.value];
+ inputOptions = options.inputOptions || [];
+
+ if(!inputOptions.length) {
+ throw new Error("prompt with checkbox requires options");
+ }
+
+ if(!inputOptions[0].value || !inputOptions[0].text) {
+ throw new Error("given options in wrong format");
+ }
+
+ // checkboxes have to nest within a containing element, so
+ // they break the rules a bit and we end up re-assigning
+ // our 'input' element to this container instead
+ input = $("");
+
+ each(inputOptions, function(_, option) {
+ var checkbox = $(templates.inputs[options.inputType]);
+
+ checkbox.find("input").attr("value", option.value);
+ checkbox.find("label").append(option.text);
+
+ // we've ensured values is an array so we can always iterate over it
+ each(values, function(_, value) {
+ if(value === option.value) {
+ checkbox.find("input").prop("checked", true);
+ }
+ });
+
+ input.append(checkbox);
+ });
+ break;
+ }
+
+ // @TODO provide an attributes option instead
+ // and simply map that as keys: vals
+ if(options.placeholder) {
+ input.attr("placeholder", options.placeholder);
+ }
+
+ if(options.pattern) {
+ input.attr("pattern", options.pattern);
+ }
+
+ if(options.maxlength) {
+ input.attr("maxlength", options.maxlength);
+ }
+
+ // now place it in our form
+ form.append(input);
+
+ form.on("submit", function(e) {
+ e.preventDefault();
+ // Fix for SammyJS (or similar JS routing library) hijacking the form post.
+ e.stopPropagation();
+ // @TODO can we actually click *the* button object instead?
+ // e.g. buttons.confirm.click() or similar
+ dialog.find(".btn-primary").click();
+ });
+
+ dialog = exports.dialog(options);
+
+ // clear the existing handler focusing the submit button...
+ dialog.off("shown.zui.modal");
+
+ // ...and replace it with one focusing our input, if possible
+ dialog.on("shown.zui.modal", function() {
+ // need the closure here since input isn't
+ // an object otherwise
+ input.focus();
+ });
+
+ if(shouldShow === true) {
+ dialog.modal("show");
+ }
+
+ return dialog;
+ };
+
+ exports.dialog = function(options) {
+ options = sanitize(options);
+
+
+ var dialog = $(templates.dialog);
+ var innerDialog = dialog.find(".modal-dialog");
+ var body = dialog.find(".modal-body");
+ var buttons = options.buttons;
+ var buttonStr = "";
+ var callbacks = {
+ onEscape: options.onEscape
+ };
+
+ if($.fn.modal === undefined) {
+ throw new Error(
+ "$.fn.modal is not defined; please double check you have included " +
+ "the Bootstrap JavaScript library. See http://getbootstrap.com/javascript/ " +
+ "for more details."
+ );
+ }
+
+ each(buttons, function(key, button) {
+
+ // @TODO I don't like this string appending to itself; bit dirty. Needs reworking
+ // can we just build up button elements instead? slower but neater. Then button
+ // can just become a template too
+ buttonStr += "";
+ callbacks[key] = button.callback;
+ });
+
+ body.find(".bootbox-body").html(options.message);
+
+ if(options.animate === true) {
+ dialog.addClass("fade");
+ }
+
+ if(options.className) {
+ dialog.addClass(options.className);
+ }
+
+ if(options.size === "large") {
+ innerDialog.addClass("modal-lg");
+ } else if(options.size === "small") {
+ innerDialog.addClass("modal-sm");
+ }
+
+ if(options.title) {
+ body.before(templates.header);
+ }
+
+ if(options.closeButton) {
+ var closeButton = $(templates.closeButton);
+
+ if(options.title) {
+ dialog.find(".modal-header").prepend(closeButton);
+ } else {
+ closeButton.css("margin-top", "-10px").prependTo(body);
+ }
+ }
+
+ if(options.title) {
+ dialog.find(".modal-title").html(options.title);
+ }
+
+ if(buttonStr.length) {
+ body.after(templates.footer);
+ dialog.find(".modal-footer").html(buttonStr);
+ }
+
+
+ /**
+ * Bootstrap event listeners; used handle extra
+ * setup & teardown required after the underlying
+ * modal has performed certain actions
+ */
+
+ dialog.on("hidden.zui.modal", function(e) {
+ // ensure we don't accidentally intercept hidden events triggered
+ // by children of the current dialog. We shouldn't anymore now BS
+ // namespaces its events; but still worth doing
+ if(e.target === this) {
+ dialog.remove();
+ }
+ });
+
+ /*
+ dialog.on("show.zui.modal", function() {
+ // sadly this doesn't work; show is called *just* before
+ // the backdrop is added so we'd need a setTimeout hack or
+ // otherwise... leaving in as would be nice
+ if (options.backdrop) {
+ dialog.next(".modal-backdrop").addClass("bootbox-backdrop");
+ }
+ });
+ */
+
+ dialog.on("shown.zui.modal", function() {
+ dialog.find(".btn-primary:first").focus();
+ });
+
+ /**
+ * Bootbox event listeners; experimental and may not last
+ * just an attempt to decouple some behaviours from their
+ * respective triggers
+ */
+
+ if(options.backdrop !== "static") {
+ // A boolean true/false according to the Bootstrap docs
+ // should show a dialog the user can dismiss by clicking on
+ // the background.
+ // We always only ever pass static/false to the actual
+ // $.modal function because with `true` we can't trap
+ // this event (the .modal-backdrop swallows it)
+ // However, we still want to sort of respect true
+ // and invoke the escape mechanism instead
+ dialog.on("click.dismiss.zui.modal", function(e) {
+ // @NOTE: the target varies in >= 3.3.x releases since the modal backdrop
+ // moved *inside* the outer dialog rather than *alongside* it
+ if(dialog.children(".modal-backdrop").length) {
+ e.currentTarget = dialog.children(".modal-backdrop").get(0);
+ }
+
+ if(e.target !== e.currentTarget) {
+ return;
+ }
+
+ dialog.trigger("escape.close.bb");
+ });
+ }
+
+ dialog.on("escape.close.bb", function(e) {
+ if(callbacks.onEscape) {
+ processCallback(e, dialog, callbacks.onEscape);
+ }
+ });
+
+ /**
+ * Standard jQuery event listeners; used to handle user
+ * interaction with our dialog
+ */
+
+ dialog.on("click", ".modal-footer button", function(e) {
+ var callbackKey = $(this).data("bb-handler");
+
+ processCallback(e, dialog, callbacks[callbackKey]);
+ });
+
+ dialog.on("click", ".bootbox-close-button", function(e) {
+ // onEscape might be falsy but that's fine; the fact is
+ // if the user has managed to click the close button we
+ // have to close the dialog, callback or not
+ processCallback(e, dialog, callbacks.onEscape);
+ });
+
+ dialog.on("keyup", function(e) {
+ if(e.which === 27) {
+ dialog.trigger("escape.close.bb");
+ }
+ });
+
+ // the remainder of this method simply deals with adding our
+ // dialogent to the DOM, augmenting it with Bootstrap's modal
+ // functionality and then giving the resulting object back
+ // to our caller
+
+ $(options.container).append(dialog);
+
+ dialog.modal({
+ backdrop: options.backdrop ? "static" : false,
+ keyboard: false,
+ show: false
+ });
+
+ if(options.show) {
+ dialog.modal("show");
+ }
+
+ // @TODO should we return the raw element here or should
+ // we wrap it in an object on which we can expose some neater
+ // methods, e.g. var d = bootbox.alert(); d.hide(); instead
+ // of d.modal("hide");
+
+ /*
+ function BBDialog(elem) {
+ this.elem = elem;
+ }
+
+ BBDialog.prototype = {
+ hide: function() {
+ return this.elem.modal("hide");
+ },
+ show: function() {
+ return this.elem.modal("show");
+ }
+ };
+ */
+
+ return dialog;
+
+ };
+
+ exports.setDefaults = function() {
+ var values = {};
+
+ if(arguments.length === 2) {
+ // allow passing of single key/value...
+ values[arguments[0]] = arguments[1];
+ } else {
+ // ... and as an object too
+ values = arguments[0];
+ }
+
+ $.extend(defaults, values);
+ };
+
+ exports.hideAll = function() {
+ $(".bootbox").modal("hide");
+
+ return exports;
+ };
+
+
+ /**
+ * standard locales. Please add more according to ISO 639-1 standard. Multiple language variants are
+ * unlikely to be required. If this gets too large it can be split out into separate JS files.
+ */
+ var locales = {
+ en: {
+ OK: "OK",
+ CANCEL: "Cancel",
+ CONFIRM: "OK"
+ },
+ zh_cn: {
+ OK: "确认",
+ CANCEL: "取消",
+ CONFIRM: "确认"
+ },
+ zh_tw: {
+ OK: "確認",
+ CANCEL: "取消",
+ CONFIRM: "確認"
+ }
+ };
+
+ exports.addLocale = function(name, values) {
+ $.each(["OK", "CANCEL", "CONFIRM"], function(_, v) {
+ if(!values[v]) {
+ throw new Error("Please supply a translation for '" + v + "'");
+ }
+ });
+
+ locales[name] = {
+ OK: values.OK,
+ CANCEL: values.CANCEL,
+ CONFIRM: values.CONFIRM
+ };
+
+ return exports;
+ };
+
+ exports.removeLocale = function(name) {
+ delete locales[name];
+
+ return exports;
+ };
+
+ exports.setLocale = function(name) {
+ return exports.setDefaults("locale", name);
+ };
+
+ exports.init = function(_$) {
+ return init(_$ || $);
+ };
+
+ return exports;
+}));
diff --git a/root/res/zui/lib/bootbox/bootbox.min.css b/root/res/zui/lib/bootbox/bootbox.min.css
new file mode 100644
index 0000000..4483c69
--- /dev/null
+++ b/root/res/zui/lib/bootbox/bootbox.min.css
@@ -0,0 +1 @@
+.bootbox.modal .modal-dialog{width:400px}
\ No newline at end of file
diff --git a/root/res/zui/lib/bootbox/bootbox.min.js b/root/res/zui/lib/bootbox/bootbox.min.js
new file mode 100644
index 0000000..c392995
--- /dev/null
+++ b/root/res/zui/lib/bootbox/bootbox.min.js
@@ -0,0 +1,2 @@
+/*! bootbox.js v4.4.0 http://bootboxjs.com/license.txt */
+!function(t,o){"use strict";"function"==typeof define&&define.amd?define(["jquery"],o):"object"==typeof exports?module.exports=o(require("jquery")):t.bootbox=o(t.jQuery)}(this,function t(o,e){"use strict";function a(t){var o=h[f.locale];return o?o[t]:h.en[t]}function n(t,e,a){t.stopPropagation(),t.preventDefault();var n=o.isFunction(a)&&a.call(e,t)===!1;n||e.modal("hide")}function r(t){var o,e=0;for(o in t)e++;return e}function i(t,e){var a=0;o.each(t,function(t,o){e(t,o,a++)})}function c(t){var e,a;if("object"!=typeof t)throw new Error("Please supply an object of options");if(!t.message)throw new Error("Please specify a message");return t=o.extend({},f,t),t.buttons||(t.buttons={}),e=t.buttons,a=r(e),i(e,function(t,n,r){if(o.isFunction(n)&&(n=e[t]={callback:n}),"object"!==o.type(n))throw new Error("button with key "+t+" must be an object");n.label||(n.label=t),n.className||(2===a&&("ok"===t||"confirm"===t)||1===a?n.className="btn-primary":n.className="btn-default")}),t}function l(t,o){var e=t.length,a={};if(e<1||e>2)throw new Error("Invalid argument length");return 2===e||"string"==typeof t[0]?(a[o[0]]=t[0],a[o[1]]=t[1]):a=t[0],a}function s(t,e,a){return o.extend(!0,{},t,l(e,a))}function u(t,o,e,a){var n={className:"bootbox-"+t,buttons:p.apply(null,o)};return b(s(n,a,e),o)}function p(){for(var t={},o=0,e=arguments.length;o