edit.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. <style type='text/css'>
  2. #poster {
  3. width:320px;height:504px;border:1px solid #ccc;position:relative
  4. }
  5. #poster .bg { position:absolute;width:100%;z-index:0}
  6. #poster .drag[type=img] img,#poster .drag[type=thumb] img { width:100%;height:100%; }
  7. #poster .drag { position: absolute; width:80px;height:80px; border:1px solid #000; }
  8. #poster .drag[type=nickname] { width:80px;height:40px; font-size:16px; font-family: 黑体;}
  9. #poster .drag img {position:absolute;z-index:0;width:100%; }
  10. #poster .rRightDown,.rLeftDown,.rLeftUp,.rRightUp,.rRight,.rLeft,.rUp,.rDown{ position:absolute; width:7px; height:7px; z-index:1; font-size:0; }
  11. #poster .rRightDown,.rLeftDown,.rLeftUp,.rRightUp,.rRight,.rLeft,.rUp,.rDown{ background:#C00; }
  12. .rLeftDown,.rRightUp{cursor:ne-resize;}
  13. .rRightDown,.rLeftUp{cursor:nw-resize;}
  14. .rRight,.rLeft{cursor:e-resize;}
  15. .rUp,.rDown{cursor:n-resize;}
  16. .rLeftDown{left:-4px;bottom:-4px;}
  17. .rRightUp{right:-4px;top:-4px;}
  18. .rRightDown{right:-4px;bottom:-4px;}
  19. .rLeftUp{left:-4px;top:-4px;}
  20. .rRight{right:-4px;top:50%;margin-top:-4px;}
  21. .rLeft{left:-4px;top:50%;margin-top:-4px;}
  22. .rUp{top:-4px;left:50%;margin-left:-4px;}
  23. .rDown{bottom:-4px;left:50%;margin-left:-4px;}
  24. .context-menu-layer { z-index:9999;}
  25. .context-menu-list { z-index:9999;}
  26. .context-menu-list {
  27. margin:0;
  28. padding:0;
  29. min-width: 120px;
  30. max-width: 250px;
  31. display: inline-block;
  32. position: absolute;
  33. list-style-type: none;
  34. border: 1px solid #DDD;
  35. background: #EEE;
  36. -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  37. -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  38. -ms-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  39. -o-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  40. box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  41. font-family: Verdana, Arial, Helvetica, sans-serif;
  42. font-size: 11px;
  43. }
  44. .context-menu-item {
  45. padding: 2px 2px 2px 24px;
  46. background-color: #EEE;
  47. position: relative;
  48. -webkit-user-select: none;
  49. -moz-user-select: -moz-none;
  50. -ms-user-select: none;
  51. user-select: none;
  52. }
  53. .context-menu-separator {
  54. padding-bottom:0;
  55. border-bottom: 1px solid #DDD;
  56. }
  57. .context-menu-item > label > input,
  58. .context-menu-item > label > textarea {
  59. -webkit-user-select: text;
  60. -moz-user-select: text;
  61. -ms-user-select: text;
  62. user-select: text;
  63. }
  64. .context-menu-item.hover {
  65. cursor: pointer;
  66. background-color: #39F;
  67. }
  68. .context-menu-item.disabled {
  69. color: #666;
  70. }
  71. .context-menu-input.hover,
  72. .context-menu-item.disabled.hover {
  73. cursor: default;
  74. background-color: #EEE;
  75. }
  76. .context-menu-submenu:after {
  77. content: ">";
  78. color: #666;
  79. position: absolute;
  80. top: 0;
  81. right: 3px;
  82. z-index: 1;
  83. }
  84. .context-menu-item.icon { min-height: 18px; background-repeat: no-repeat; background-position: 4px 2px; }
  85. /* vertically align inside labels */
  86. .context-menu-input > label > * { vertical-align: top; }
  87. /* position checkboxes and radios as icons */
  88. .context-menu-input > label > input[type="checkbox"],
  89. .context-menu-input > label > input[type="radio"] {
  90. margin-left: -17px;
  91. }
  92. .context-menu-input > label > span {
  93. margin-left: 5px;
  94. }
  95. .context-menu-input > label,
  96. .context-menu-input > label > input[type="text"],
  97. .context-menu-input > label > textarea,
  98. .context-menu-input > label > select {
  99. display: block;
  100. width: 100%;
  101. -webkit-box-sizing: border-box;
  102. -moz-box-sizing: border-box;
  103. -ms-box-sizing: border-box;
  104. -o-box-sizing: border-box;
  105. box-sizing: border-box;
  106. }
  107. .context-menu-input > label > textarea {
  108. height: 100px;
  109. }
  110. .context-menu-item > .context-menu-list {
  111. display: none;
  112. right: -5px;
  113. top: 5px;
  114. }
  115. .context-menu-item.hover > .context-menu-list {
  116. display: block;
  117. }
  118. .context-menu-accesskey {
  119. text-decoration: underline;
  120. }
  121. .n-msg{display: none!important;}
  122. </style>
  123. <form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
  124. <div class="tab-pane active" id="tab_design">
  125. <div class="form-group">
  126. <div class="col-sm-12">
  127. <table style="width:100%;">
  128. <tbody>
  129. <tr>
  130. <td style="width:320px;padding:10px;" valign="top">
  131. <div id="poster">
  132. <img src='{$row.bg_image|htmlentities}' class='bg'/>
  133. {if !empty($row['data'])}
  134. {foreach name="row.data" item="d"}
  135. <div class="drag" type="{$d['type']}" index="{++$key}" style="zindex:{$key};left:{$d['left']};top:{$d['top']};width:{$d['width']};height:{$d['height']}" src="{$d['src']|default=''}" size="{$d['size']|default='15px'}" color="{$d['color']|default='#000'}" qr_table="{$d['qr_table']|default=''}" qr_field="{$d['qr_field']|default=''}" qr_relation="{$d['qr_relation']|default=''}">
  136. {if $d['type']=='qr'}
  137. <img src="/assets/addons/poster/images/qr.jpg" />
  138. {elseif $d['type']=='head'}
  139. <img src="/assets/addons/poster/images/head.jpg" />
  140. {elseif $d['type']=='img'}
  141. {if empty($d['src'])}
  142. <img src="/assets/addons/poster/images/img.jpg" />
  143. {else}
  144. <img src="{$d['src']}" />
  145. {/if}
  146. {elseif $d['type']=='nickname'}
  147. <div class="text" style="font-size:{$d.size|default='15px'};color:{$d.color|default='#000'}">昵称</div>
  148. {/if}
  149. <div class="rRightDown"></div>
  150. <div class="rLeftDown"></div>
  151. <div class="rRightUp"></div>
  152. <div class="rLeftUp"></div>
  153. <div class="rRight"></div>
  154. <div class="rLeft"></div>
  155. <div class="rUp"></div>
  156. <div class="rDown"></div>
  157. </div>
  158. {/foreach}
  159. {/if}
  160. </div>
  161. </td>
  162. <td valign="top" style="padding:10px;">
  163. <div class="panel panel-default">
  164. <div class="panel-body">
  165. <div class="form-group">
  166. <label class="control-label col-xs-12 col-sm-3">{:__('Title')}:</label>
  167. <div class="col-xs-12 col-sm-8">
  168. <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" placeholder="此项必须填写" value="{$row.title|htmlentities}">
  169. </div>
  170. </div>
  171. <div class="form-group">
  172. <label class="control-label col-xs-12 col-sm-3">{:__('Waittext')}:</label>
  173. <div class="col-xs-12 col-sm-8">
  174. <input id="c-waittext" class="form-control" name="row[waittext]" type="text" placeholder="例如:您的专属海报正在拼命生成中,请等待片刻..." value="{$row.waittext|htmlentities}">
  175. </div>
  176. </div>
  177. <div class="form-group">
  178. <label class="control-label col-xs-12 col-sm-3">{:__('Status')}:</label>
  179. <div class="col-xs-12 col-sm-8">
  180. <div class="radio">
  181. {foreach name="statusList" item="vo"}
  182. <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
  183. {/foreach}
  184. </div>
  185. </div>
  186. </div>
  187. <div class="form-group">
  188. <label for="c-weigh" class="control-label col-xs-12 col-sm-3">{:__('Weigh')}:</label>
  189. <div class="col-xs-12 col-sm-8">
  190. <input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="{$row.weigh}">
  191. </div>
  192. </div>
  193. <div class="form-group">
  194. <label class="control-label col-xs-12 col-sm-3">{:__('Bg_image')}:</label>
  195. <div class="col-xs-12 col-sm-8">
  196. <div class="input-group">
  197. <input id="c-bg_image" class="form-control" size="50" name="row[bg_image]" type="text" value="{$row.bg_image|htmlentities}">
  198. <div class="input-group-addon no-border no-padding">
  199. <span><button type="button" id="plupload-bg_image" class="btn btn-danger plupload" data-input-id="c-bg_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-bg_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  200. <span><button type="button" id="fachoose-bg_image" class="btn btn-primary fachoose" data-input-id="c-bg_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  201. </div>
  202. <span class="msg-box n-right" for="c-bg_image"></span>
  203. </div>
  204. <ul class="row list-inline plupload-preview" id="p-bg_image"></ul>
  205. </div>
  206. <label class="control-label col-xs-12 col-sm-3"></label>
  207. <div class="col-xs-12 col-sm-8">
  208. <span class="help-block">背景图片尺寸: 640 * 1008</span>
  209. </div>
  210. </div>
  211. <div class="form-group">
  212. <label class="control-label col-xs-12 col-sm-3">{:__('Poster elements')}:</label>
  213. <div class="col-xs-12 col-sm-8">
  214. <button class="btn btn-default btn-com" type="button" data-type="head">头像</button>
  215. <button class="btn btn-default btn-com" type="button" data-type="nickname">昵称</button>
  216. <button class="btn btn-default btn-com" type="button" data-type="qr">二维码</button>
  217. <button class="btn btn-default btn-com" type="button" data-type="img">图片</button>
  218. </div>
  219. </div>
  220. <div class="form-group nameset" style='display:none'>
  221. <label class="control-label col-xs-12 col-sm-3">{:__('Nickname color')}:</label>
  222. <div class="col-xs-12 col-sm-8">
  223. <div class="row">
  224. <div class="col-sm-8 col-xs-12">
  225. <input id="c-color" data-rule="required" class="form-control" name="color" type="text" value="" style="width: 50%">
  226. <span class="input-group-btn" style="display: unset;">
  227. <button type="button" class="btn btn-default btn-color colorpicker" style="padding:0;margin-left:1px;" title="选择颜色"><img src="__CDN__/assets/addons/poster/images/colorful.png" height="29" alt=""></button>
  228. <span class="msg-box n-right" for="c-color"></span>
  229. </div>
  230. <div class="col-sm-4"></div>
  231. </div>
  232. </div>
  233. </div>
  234. <div class="form-group nameset" style='display:none'>
  235. <label class="control-label col-xs-12 col-sm-3">{:__('Nickname size')}:</label>
  236. <div class="col-xs-12 col-sm-8">
  237. <input type="text" id="namesize" data-rule="required" class="form-control namesize" placeholder="例如: 14,16" style="width: 90%;"/>
  238. <div class="input-group-addon" style="display: contents;">px</div>
  239. </div>
  240. </div>
  241. <div class="form-group qrset" style='display:none'>
  242. <label class="control-label col-xs-12 col-sm-3">{:__('Qr_table')}:</label>
  243. <div class="col-xs-12 col-sm-8">
  244. {:build_select('qr_table',$tableList,'',['class'=>'form-control selectpicker']);}
  245. </div>
  246. </div>
  247. <div class="form-group qrset" style='display:none'>
  248. <label class="control-label col-xs-12 col-sm-3">{:__('Qr_field')}:</label>
  249. <div class="col-xs-12 col-sm-8">
  250. <select id="c-qr_field" data-rule="required" style="height:30px;" class="form-control selectpicker"></select>
  251. </div>
  252. </div>
  253. <div class="form-group qrset" style='display:none'>
  254. <label class="control-label col-xs-12 col-sm-3">{:__('Qr_relation')}:</label>
  255. <div class="col-xs-12 col-sm-8">
  256. <select id="c-qr_relation" data-rule="required" style="height:30px;" class="form-control selectpicker"></select>
  257. </div>
  258. </div>
  259. <div class="form-group imgset" style='display:none'>
  260. <label class="control-label col-xs-12 col-sm-3">{:__('Graphics Settings')}:</label>
  261. <div class="col-xs-12 col-sm-8">
  262. <div class="input-group">
  263. <input id="c-img" data-rule="required" class="form-control" size="50" name="img" type="text" value="">
  264. <div class="input-group-addon no-border no-padding">
  265. <span><button type="button" id="plupload-img" class="btn btn-danger plupload" data-input-id="c-img" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-img"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  266. <span><button type="button" id="fachoose-img" class="btn btn-primary fachoose" data-input-id="c-img" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  267. </div>
  268. <span class="msg-box n-right" for="c-img"></span>
  269. </div>
  270. <ul class="row list-inline plupload-preview" id="p-img"></ul>
  271. </div>
  272. </div>
  273. </div>
  274. </div>
  275. </td>
  276. </tr>
  277. </tbody>
  278. </table>
  279. </div>
  280. </div>
  281. </div>
  282. <div class="form-group layer-footer">
  283. <label class="control-label col-xs-12 col-sm-2"></label>
  284. <div class="col-xs-12 col-sm-8">
  285. <input type="hidden" name="row[data]" value="" />
  286. <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
  287. <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
  288. </div>
  289. </div>
  290. </form>