zet-lib 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/moduleLib.js +12 -11
- package/package.json +1 -1
package/lib/moduleLib.js
CHANGED
|
@@ -22,7 +22,7 @@ m.ide = function (req,res,elem) {
|
|
|
22
22
|
let head = ``;
|
|
23
23
|
let end = ``;
|
|
24
24
|
elem = elem || "#ide_editor";
|
|
25
|
-
|
|
25
|
+
end += `<script> var editor_${elem} = ace.edit("${elem}");
|
|
26
26
|
editor_${elem}.getSession().setMode("ace/mode/ejs");
|
|
27
27
|
</script> ${Util.newLine}`;
|
|
28
28
|
return {
|
|
@@ -50,8 +50,8 @@ m.datepicker = function (req, res, elem) {
|
|
|
50
50
|
let head = ``;
|
|
51
51
|
let end = ``;
|
|
52
52
|
elem = elem || ".datepicker";
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
/* head += '<link href="/css/bootstrap-datepicker.css" rel="stylesheet">';
|
|
54
|
+
end += '<script src="/js/bootstrap-datepicker.min.js"></script>';*/
|
|
55
55
|
head += '<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.min.css" rel="stylesheet">';
|
|
56
56
|
end += '<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.min.js"></script>';
|
|
57
57
|
script = `$.fn.datepicker.defaults.format = "yyyy-mm-dd";$.fn.datepicker.defaults.todayHighlight = true;$("body").on("click", "${elem}", function(){$(this).datepicker();$(this).datepicker("show");});`;
|
|
@@ -69,12 +69,12 @@ m.datetimepicker = function (req, res, elem) {
|
|
|
69
69
|
let head = ``;
|
|
70
70
|
let end = ``;
|
|
71
71
|
elem = elem || ".datetimepicker";
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
72
|
+
head += '<link href="/css/bootstrap-datetimepicker.min.css" rel="stylesheet" />';
|
|
73
|
+
end += '<script type="text/javascript" src="/js/moment-with-locales.min.js" ></script>';
|
|
74
|
+
end += '<script type="text/javascript" src="/js/bootstrap-datetimepicker.min.js" ></script>';
|
|
75
|
+
script += `$(function () { $("${elem}").datetimepicker({format:'YYYY-MM-DD hh:mm:ss'}); });`;
|
|
76
|
+
script += `setTimeout(function () { $("body").click();},1000);`;
|
|
77
|
+
script += `$("body").on("click", function(){$("${elem}").datetimepicker({format:'YYYY-MM-DD hh:mm:ss'});});`;
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
return {
|
|
@@ -171,6 +171,7 @@ m.editor = (req, res, elem = "") => {
|
|
|
171
171
|
let head = ``;
|
|
172
172
|
let end = ``;
|
|
173
173
|
|
|
174
|
+
head += '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.4.2/css/all.min.css" integrity="sha512-NicFTMUg/LwBeG8C7VG+gC4YiiRtQACl98QdkmfsLy37RzXdkaUAuPyVMND0olPP4Jn8M/ctesGSB2pgUBDRIw==" crossorigin="anonymous" referrerpolicy="no-referrer" />';
|
|
174
175
|
head += '<link href="https://cdn.jsdelivr.net/npm/froala-editor@2.9.0/css/froala_editor.pkgd.min.css" rel="stylesheet" type="text/css" />';
|
|
175
176
|
head += '<link href="https://cdn.jsdelivr.net/npm/froala-editor@2.9.0/css/froala_style.min.css" rel="stylesheet" type="text/css" />';
|
|
176
177
|
end += '<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/froala-editor@2.9.0/js/froala_editor.pkgd.min.js"></script>';
|
|
@@ -273,8 +274,8 @@ m.typeahead = (req, res, elem, data) => {
|
|
|
273
274
|
let element = elem.replace("Typeahead", "");
|
|
274
275
|
|
|
275
276
|
script += 'const ' + elemData + 'Data = ' + JSON.stringify(data.filter(function (value, index, arr) {
|
|
276
|
-
|
|
277
|
-
|
|
277
|
+
return index > 0;
|
|
278
|
+
})) + ';' + newLine;
|
|
278
279
|
script += `$("body").on("change", "${elem}", function(){
|
|
279
280
|
var current = $("${elem}").typeahead("getActive");
|
|
280
281
|
if(current){
|