添加项目文件。

This commit is contained in:
zgf committed 2023-07-25 19:20:18 +08:00
1 parent 05e131ca4e
commit 514d6f5255
1162 files changed
+81255

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

@@ -0,0 +1,2 @@
/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */
.section,.section ul,.wrapper,body{overflow:hidden}.section .preview caption,.section h3{font-weight:700}body{width:540px}.wrapper{margin:10px auto 0;font-size:12px;width:520px;height:315px}.clear{clear:both}.wrapper .left{float:left;margin-left:10px}.wrapper .right{float:right;border-left:2px dotted #EDEDED;padding-left:15px}.section{margin-bottom:15px;width:240px}.section h3{padding:5px 0;margin-bottom:10px;border-bottom:1px solid #EDEDED;font-size:12px}.section ul{list-style:none;clear:both}.section li{float:left;width:120px}.section .tone{width:80px}.section .preview{width:220px}.section .preview table{text-align:center;vertical-align:middle;color:#666}.section .preview td{border-width:1px;border-style:solid;height:22px}.section .preview th{border-style:solid;border-color:#DDD;border-width:2px 1px 1px;height:22px;background-color:#F7F7F7}
@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title></title><script src="../internal.js"></script><link rel="stylesheet" href="edittable.css"></head><body><div class="wrapper"><div class="left"><div class="section"><h3><var id="lang_tableStyle"></var></h3><ul><li><label onselectstart="return!1"><input type="checkbox" id="J_title" name="style"><var id="lang_insertTitle"></var></label></li><li><label onselectstart="return!1"><input type="checkbox" id="J_titleCol" name="style"><var id="lang_insertTitleCol"></var></label></li></ul><ul><li><label onselectstart="return!1"><input type="checkbox" id="J_caption" name="style"><var id="lang_insertCaption"></var></label></li><li><label onselectstart="return!1"><input type="checkbox" id="J_sorttable" name="style"><var id="lang_orderbycontent"></var></label></li></ul><div class="clear"></div></div><div class="section"><h3><var id="lang_tableSize"></var></h3><ul><li><label><input type="radio" id="J_autoSizeContent" name="size"><var id="lang_autoSizeContent"></var></label></li><li><label><input type="radio" id="J_autoSizePage" name="size"><var id="lang_autoSizePage"></var></label></li></ul><div class="clear"></div></div><div class="section"><h3><var id="lang_borderStyle"></var></h3><ul><li><span><var id="lang_color"></var></span> <input type="text" class="tone" id="J_tone" readonly></li></ul><div class="clear"></div></div></div><div class="right"><div class="section"><h3><var id="lang_example"></var></h3><div class="preview" id="J_preview"></div></div></div></div><script src="edittable.js"></script></body></html>
@@ -0,0 +1,2 @@
/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */
;!function(){var e,t=$G("J_title"),o=$G("J_titleCol"),n=$G("J_caption"),a=$G("J_sorttable"),i=$G("J_autoSizeContent"),r=$G("J_autoSizePage"),l=$G("J_tone"),d=$G("J_preview"),c=function(){e=this,e.init()};c.prototype={init:function(){var d=new UE.ui.ColorPicker({editor:editor}),c=new UE.ui.Popup({editor:editor,content:d});t.checked=editor.queryCommandState("inserttitle")==-1,o.checked=editor.queryCommandState("inserttitlecol")==-1,n.checked=editor.queryCommandState("insertcaption")==-1,a.checked=1==editor.queryCommandState("enablesort");var m=editor.queryCommandState("enablesort"),s=editor.queryCommandState("disablesort");a.checked=!!(m<0&&s>=0),a.disabled=!!(m<0&&s<0),a.title=m<0&&s<0?lang.errorMsg:"",e.createTable(t.checked,o.checked,n.checked),e.setAutoSize(),e.setColor(e.getColor()),domUtils.on(t,"click",e.titleHanler),domUtils.on(o,"click",e.titleColHanler),domUtils.on(n,"click",e.captionHanler),domUtils.on(a,"click",e.sorttableHanler),domUtils.on(i,"click",e.autoSizeContentHanler),domUtils.on(r,"click",e.autoSizePageHanler),domUtils.on(l,"click",function(){c.showAnchor(l)}),domUtils.on(document,"mousedown",function(){c.hide()}),d.addListener("pickcolor",function(){e.setColor(arguments[1]),c.hide()}),d.addListener("picknocolor",function(){e.setColor(""),c.hide()})},createTable:function(e,t,o){var n=[];if(n.push("<table id='J_example'>"),o&&n.push("<caption>"+lang.captionName+"</caption>"),e){n.push("<tr>"),t&&n.push("<th>"+lang.titleName+"</th>");for(var a=0;a<5;a++)n.push("<th>"+lang.titleName+"</th>");n.push("</tr>")}for(var i=0;i<6;i++){n.push("<tr>"),t&&n.push("<th>"+lang.titleName+"</th>");for(var r=0;r<5;r++)n.push("<td>"+lang.cellsName+"</td>");n.push("</tr>")}n.push("</table>"),d.innerHTML=n.join(""),this.updateSortSpan()},titleHanler:function(){var o=$G("J_example"),n=document.createDocumentFragment(),a=domUtils.getComputedStyle(domUtils.getElementsByTagName(o,"td")[0],"border-color"),i=o.rows[0].children.length;if(t.checked){o.insertRow(0);for(var r,l=0;l<i;l++)r=document.createElement("th"),r.innerHTML=lang.titleName,n.appendChild(r);o.rows[0].appendChild(n)}else domUtils.remove(o.rows[0]);e.setColor(a),e.updateSortSpan()},titleColHanler:function(){var t=$G("J_example"),n=domUtils.getComputedStyle(domUtils.getElementsByTagName(t,"td")[0],"border-color"),a=t.rows,i=a.length;if(o.checked)for(var r,l=0;l<i;l++)r=document.createElement("th"),r.innerHTML=lang.titleName,a[l].insertBefore(r,a[l].children[0]);else for(var l=0;l<i;l++)domUtils.remove(a[l].children[0]);e.setColor(n),e.updateSortSpan()},captionHanler:function(){var e=$G("J_example");if(n.checked){var t=document.createElement("caption");t.innerHTML=lang.captionName,e.insertBefore(t,e.firstChild)}else domUtils.remove(domUtils.getElementsByTagName(e,"caption")[0])},sorttableHanler:function(){e.updateSortSpan()},autoSizeContentHanler:function(){var e=$G("J_example");e.removeAttribute("width")},autoSizePageHanler:function(){var e=$G("J_example"),t=e.getElementsByTagName(e,"td");utils.each(t,function(e){e.removeAttribute("width")}),e.setAttribute("width","100%")},updateSortSpan:function(){var e=$G("J_example"),t=e.rows[0],o=domUtils.getElementsByTagName(e,"span");utils.each(o,function(e){e.parentNode.removeChild(e)}),a.checked&&utils.each(t.cells,function(e,t){var o=document.createElement("span");o.innerHTML="^",e.appendChild(o)})},getColor:function(){var e,t=editor.selection.getStart(),o=domUtils.findParentByTagName(t,["td","th","caption"],!0);return e=o&&domUtils.getComputedStyle(o,"border-color"),e||(e="#DDDDDD"),e},setColor:function(e){var t=$G("J_example"),o=domUtils.getElementsByTagName(t,"td").concat(domUtils.getElementsByTagName(t,"th"),domUtils.getElementsByTagName(t,"caption"));l.value=e,utils.each(o,function(t){t.style.borderColor=e})},setAutoSize:function(){var e=this;r.checked=!0,e.autoSizePageHanler()}},new c,dialog.onok=function(){editor.__hasEnterExecCommand=!0;var e={title:"inserttitle deletetitle",titleCol:"inserttitlecol deletetitlecol",caption:"insertcaption deletecaption",sorttable:"enablesort disablesort"};editor.fireEvent("saveScene");for(var t in e){var o=e[t].split(" "),n=$G("J_"+t);n.checked?editor.queryCommandState(o[0])!=-1&&editor.execCommand(o[0]):editor.queryCommandState(o[1])!=-1&&editor.execCommand(o[1])}editor.execCommand("edittable",l.value),i.checked?editor.execCommand("adaptbytext"):"",r.checked?editor.execCommand("adaptbywindow"):"",editor.fireEvent("saveScene"),editor.__hasEnterExecCommand=!1}}();
@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title></title><script src="../internal.js"></script><style>.section{text-align:center;margin-top:10px}.section input{margin-left:5px;width:70px}</style></head><body><div class="section"><span><var id="lang_tdBkColor"></var></span> <input type="text" id="J_tone"></div><script>var tone=$G("J_tone"),colorPiker=new UE.ui.ColorPicker({editor:editor}),colorPop=new UE.ui.Popup({editor:editor,content:colorPiker});domUtils.on(tone,"click",function(){colorPop.showAnchor(tone)}),domUtils.on(document,"mousedown",function(){colorPop.hide()}),colorPiker.addListener("pickcolor",function(){tone.value=arguments[1],colorPop.hide()}),colorPiker.addListener("picknocolor",function(){tone.value="",colorPop.hide()}),dialog.onok=function(){editor.execCommand("edittd",tone.value)};var start=editor.selection.getStart(),cell=start&&domUtils.findParentByTagName(start,["td","th"],!0);if(cell){var color=domUtils.getComputedStyle(cell,"background-color");/^#/.test(color)&&(tone.value=color)}</script></body></html>
@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>表格删除提示</title><script src="../internal.js"></script><style>.section{width:200px;margin:10px auto 0;font-size:14px}.item{text-align:center}</style></head><body><div class="section"><div class="item"><label><input type="radio" id="J_delRow" name="cmd" checked><var id="lang_delRow"></var></label></div><div class="item"><label><input type="radio" id="J_delCol" name="cmd"><var id="lang_delCol"></var></label></div></div><script>dialog.onok=function(){$G("J_delRow").checked?editor.execCommand("deleterow"):editor.execCommand("deletecol")}</script></body></html>