svg-editor.php 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. use ChamiloSession as Session;
  4. /**
  5. * Integrate svg-edit with Chamilo
  6. * @author Juan Carlos Raña Trabado
  7. * @since 25/september/2010
  8. */
  9. require_once '../../../../inc/global.inc.php';//hack for Chamilo
  10. api_protect_course_script();
  11. api_block_anonymous_users();
  12. $svgEditPath = api_get_path(WEB_LIBRARY_PATH).'javascript/svgedit/';
  13. ?>
  14. <!DOCTYPE html>
  15. <html>
  16. <!-- removed for now, causes problems in Firefox: manifest="svg-editor.manifest" -->
  17. <head>
  18. <meta charset="utf-8" />
  19. <meta http-equiv="X-UA-Compatible" content="IE=Edge, chrome=1"/>
  20. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
  21. <meta name="apple-mobile-web-app-capable" content="yes"/>
  22. <link rel="icon" type="image/png" href="<?php echo $svgEditPath; ?>images/logo.png"/>
  23. <link rel="stylesheet" href="<?php echo $svgEditPath; ?>jgraduate/css/jPicker.css" type="text/css"/>
  24. <link rel="stylesheet" href="<?php echo $svgEditPath; ?>jgraduate/css/jgraduate.css" type="text/css"/>
  25. <link rel="stylesheet" href="<?php echo $svgEditPath; ?>svg-editor.css" type="text/css"/>
  26. <link rel="stylesheet" href="custom.css" type="text/css"/>
  27. <link rel="stylesheet" href="<?php echo $svgEditPath; ?>spinbtn/JQuerySpinBtn.css" type="text/css"/>
  28. <?php /* echo api_get_js('jquery.min.js'); */?>
  29. <script src="<?php echo $svgEditPath; ?>jquery.js"></script>
  30. <script src="<?php echo $svgEditPath; ?>js-hotkeys/jquery.hotkeys.min.js"></script>
  31. <script src="<?php echo $svgEditPath; ?>jquerybbq/jquery.bbq.min.js"></script>
  32. <script src="<?php echo $svgEditPath; ?>svgicons/jquery.svgicons.js"></script>
  33. <script src="<?php echo $svgEditPath; ?>jgraduate/jquery.jgraduate.min.js"></script>
  34. <script src="<?php echo $svgEditPath; ?>spinbtn/JQuerySpinBtn.min.js"></script>
  35. <script src="<?php echo $svgEditPath; ?>touch.js"></script>
  36. <!--{if svg_edit_release}-->
  37. <script src="<?php echo $svgEditPath; ?>svgedit.compiled.js"></script>
  38. <!--{else}>
  39. <script src="svgedit.js"></script>
  40. <script src="jquery-svg.js"></script>
  41. <script src="contextmenu/jquery.contextMenu.js"></script>
  42. <script src="pathseg.js"></script>
  43. <script src="browser.js"></script>
  44. <script src="svgtransformlist.js"></script>
  45. <script src="math.js"></script>
  46. <script src="units.js"></script>
  47. <script src="svgutils.js"></script>
  48. <script src="sanitize.js"></script>
  49. <script src="history.js"></script>
  50. <script src="coords.js"></script>
  51. <script src="recalculate.js"></script>
  52. <script src="select.js"></script>
  53. <script src="draw.js"></script>
  54. <script src="path.js"></script>
  55. <script src="svgcanvas.js"></script>
  56. <script src="svg-editor.js"></script>
  57. <script src="locale/locale.js"></script>
  58. <script src="contextmenu.js"></script>
  59. <!{endif}-->
  60. <!-- always minified scripts -->
  61. <script src="<?php echo $svgEditPath; ?>jquery-ui/jquery-ui-1.8.17.custom.min.js"></script>
  62. <script src="<?php echo $svgEditPath; ?>jgraduate/jpicker.js"></script>
  63. <!-- If you do not wish to add extensions by URL, you can load them
  64. by creating the following file and adding by calls to svgEditor.setConfig -->
  65. <script src="<?php echo $svgEditPath; ?>config.js"></script>
  66. <!-- feeds -->
  67. <link rel="alternate" type="application/atom+xml" title="SVG-edit General Discussion" href="http://groups.google.com/group/svg-edit/feed/atom_v1_0_msgs.xml" />
  68. <link rel="alternate" type="application/atom+xml" title="SVG-edit Updates (Issues/Fixes/Commits)" href="http://code.google.com/feeds/p/svg-edit/updates/basic" />
  69. <!-- Add script with custom handlers here -->
  70. <title>SVG-edit</title>
  71. </head>
  72. <body>
  73. <div id="svg_editor">
  74. <div id="rulers">
  75. <div id="ruler_corner"></div>
  76. <div id="ruler_x">
  77. <div>
  78. <canvas height="15"></canvas>
  79. </div>
  80. </div>
  81. <div id="ruler_y">
  82. <div>
  83. <canvas width="15"></canvas>
  84. </div>
  85. </div>
  86. </div>
  87. <div id="workarea">
  88. <style id="styleoverrides" type="text/css" media="screen" scoped="scoped"></style>
  89. <div id="svgcanvas" style="position:relative">
  90. </div>
  91. </div>
  92. <div id="sidepanels">
  93. <div id="layerpanel">
  94. <h3 id="layersLabel">Layers</h3>
  95. <fieldset id="layerbuttons">
  96. <div id="layer_new" class="layer_button" title="New Layer"></div>
  97. <div id="layer_delete" class="layer_button" title="Delete Layer"></div>
  98. <div id="layer_rename" class="layer_button" title="Rename Layer"></div>
  99. <div id="layer_up" class="layer_button" title="Move Layer Up"></div>
  100. <div id="layer_down" class="layer_button" title="Move Layer Down"></div>
  101. <div id="layer_moreopts" class="layer_button" title="More Options"></div>
  102. </fieldset>
  103. <table id="layerlist">
  104. <tr class="layer">
  105. <td class="layervis"></td>
  106. <td class="layername">Layer 1</td>
  107. </tr>
  108. </table>
  109. <span id="selLayerLabel">Move elements to:</span>
  110. <select id="selLayerNames" title="Move selected elements to a different layer" disabled="disabled">
  111. <option selected="selected" value="layer1">Layer 1</option>
  112. </select>
  113. </div>
  114. <div id="sidepanel_handle" title="Drag left/right to resize side panel [X]">L a y e r s</div>
  115. </div>
  116. <div id="main_button">
  117. <div id="main_icon" class="tool_button" title="Main Menu">
  118. <span></span>
  119. <div id="logo"></div>
  120. <div class="dropdown"></div>
  121. </div>
  122. <div id="main_menu">
  123. <!-- File-like buttons: New, Save, Source -->
  124. <ul>
  125. <li id="tool_clear">
  126. <div></div>
  127. New Image (N)
  128. </li>
  129. <li id="tool_open" style="display:none;">
  130. <div id="fileinputs">
  131. <div></div>
  132. </div>
  133. Open SVG
  134. </li>
  135. <li id="tool_import" style="display:none;">
  136. <div id="fileinputs_import">
  137. <div></div>
  138. </div>
  139. Import Image
  140. </li>
  141. <li id="tool_save">
  142. <div></div>
  143. Save Image (S)
  144. </li>
  145. <li id="tool_export">
  146. <div></div>
  147. Export
  148. </li>
  149. <li id="tool_docprops">
  150. <div></div>
  151. Document Properties (D)
  152. </li>
  153. </ul>
  154. <p>
  155. <!-- <a href="http://svg-edit.googlecode.com/" target="_blank">
  156. SVG-edit Home Page
  157. </a> --><!-- Comment for Chamilo -->
  158. </p>
  159. <button id="tool_prefs_option">
  160. Editor Options
  161. </button>
  162. </div>
  163. </div>
  164. <div id="tools_top" class="tools_panel">
  165. <div id="editor_panel">
  166. <div class="tool_sep"></div>
  167. <div class="push_button" id="tool_source" title="Edit Source [U]"></div>
  168. <div class="tool_button" id="tool_wireframe" title="Wireframe Mode [F]"></div>
  169. </div>
  170. <!-- History buttons -->
  171. <div id="history_panel">
  172. <div class="tool_sep"></div>
  173. <div class="push_button tool_button_disabled" id="tool_undo" title="Undo [Z]"></div>
  174. <div class="push_button tool_button_disabled" id="tool_redo" title="Redo [Y]"></div>
  175. </div>
  176. <!-- Buttons when a single element is selected -->
  177. <div id="selected_panel">
  178. <div class="toolset">
  179. <div class="tool_sep"></div>
  180. <div class="push_button" id="tool_clone" title="Duplicate Element [D]"></div>
  181. <div class="push_button" id="tool_delete" title="Delete Element [Delete/Backspace]"></div>
  182. <div class="tool_sep"></div>
  183. <div class="push_button" id="tool_move_top" title="Bring to Front [ Ctrl+Shift+] ]"></div>
  184. <div class="push_button" id="tool_move_bottom" title="Send to Back [ Ctrl+Shift+[ ]"></div>
  185. <div class="push_button" id="tool_topath" title="Convert to Path"></div>
  186. <div class="push_button" id="tool_reorient" title="Reorient path"></div>
  187. <div class="push_button" id="tool_make_link" title="Make (hyper)link"></div>
  188. <div class="tool_sep"></div>
  189. <label id="idLabel" title="Identify the element">
  190. <span>id:</span>
  191. <input id="elem_id" class="attr_changer" data-attr="id" size="10" type="text"/>
  192. </label>
  193. <label id="classLabel" title="Element class">
  194. <span>class:</span>
  195. <input id="elem_class" class="attr_changer" data-attr="class" size="10" type="text"/>
  196. </label>
  197. </div>
  198. <label id="tool_angle" title="Change rotation angle" class="toolset">
  199. <span id="angleLabel" class="icon_label"></span>
  200. <input id="angle" size="2" value="0" type="text"/>
  201. </label>
  202. <div class="toolset" id="tool_blur" title="Change gaussian blur value">
  203. <label>
  204. <span id="blurLabel" class="icon_label"></span>
  205. <input id="blur" size="2" value="0" type="text"/>
  206. </label>
  207. <div id="blur_dropdown" class="dropdown">
  208. <button></button>
  209. <ul>
  210. <li class="special"><div id="blur_slider"></div></li>
  211. </ul>
  212. </div>
  213. </div>
  214. <div class="dropdown toolset" id="tool_position" title="Align Element to Page">
  215. <div id="cur_position" class="icon_label"></div>
  216. <button></button>
  217. </div>
  218. <div id="xy_panel" class="toolset">
  219. <label>
  220. x: <input id="selected_x" class="attr_changer" title="Change X coordinate" size="3" data-attr="x"/>
  221. </label>
  222. <label>
  223. y: <input id="selected_y" class="attr_changer" title="Change Y coordinate" size="3" data-attr="y"/>
  224. </label>
  225. </div>
  226. </div>
  227. <!-- Buttons when multiple elements are selected -->
  228. <div id="multiselected_panel">
  229. <div class="tool_sep"></div>
  230. <div class="push_button" id="tool_clone_multi" title="Clone Elements [C]"></div>
  231. <div class="push_button" id="tool_delete_multi" title="Delete Selected Elements [Delete/Backspace]"></div>
  232. <div class="tool_sep"></div>
  233. <div class="push_button" id="tool_group_elements" title="Group Elements [G]"></div>
  234. <div class="push_button" id="tool_make_link_multi" title="Make (hyper)link"></div>
  235. <div class="push_button" id="tool_alignleft" title="Align Left"></div>
  236. <div class="push_button" id="tool_aligncenter" title="Align Center"></div>
  237. <div class="push_button" id="tool_alignright" title="Align Right"></div>
  238. <div class="push_button" id="tool_aligntop" title="Align Top"></div>
  239. <div class="push_button" id="tool_alignmiddle" title="Align Middle"></div>
  240. <div class="push_button" id="tool_alignbottom" title="Align Bottom"></div>
  241. <label id="tool_align_relative">
  242. <span id="relativeToLabel">relative to:</span>
  243. <select id="align_relative_to" title="Align relative to ...">
  244. <option id="selected_objects" value="selected">selected objects</option>
  245. <option id="largest_object" value="largest">largest object</option>
  246. <option id="smallest_object" value="smallest">smallest object</option>
  247. <option id="page" value="page">page</option>
  248. </select>
  249. </label>
  250. <div class="tool_sep"></div>
  251. </div>
  252. <div id="rect_panel">
  253. <div class="toolset">
  254. <label id="rect_width_tool" title="Change rectangle width">
  255. <span id="rwidthLabel" class="icon_label"></span>
  256. <input id="rect_width" class="attr_changer" size="3" data-attr="width"/>
  257. </label>
  258. <label id="rect_height_tool" title="Change rectangle height">
  259. <span id="rheightLabel" class="icon_label"></span>
  260. <input id="rect_height" class="attr_changer" size="3" data-attr="height"/>
  261. </label>
  262. </div>
  263. <label id="cornerRadiusLabel" title="Change Rectangle Corner Radius" class="toolset">
  264. <span class="icon_label"></span>
  265. <input id="rect_rx" size="3" value="0" type="text" data-attr="Corner Radius"/>
  266. </label>
  267. </div>
  268. <div id="image_panel">
  269. <div class="toolset">
  270. <label><span id="iwidthLabel" class="icon_label"></span>
  271. <input id="image_width" class="attr_changer" title="Change image width" size="3" data-attr="width"/>
  272. </label>
  273. <label><span id="iheightLabel" class="icon_label"></span>
  274. <input id="image_height" class="attr_changer" title="Change image height" size="3" data-attr="height"/>
  275. </label>
  276. </div>
  277. <div class="toolset">
  278. <label id="tool_image_url">url:
  279. <input id="image_url" type="text" title="Change URL" size="35"/>
  280. </label>
  281. <label id="tool_change_image">
  282. <button id="change_image_url" style="display:none;">Change Image</button>
  283. <span id="url_notice" title="NOTE: This image cannot be embedded. It will depend on this path to be displayed"></span>
  284. </label>
  285. </div>
  286. </div>
  287. <div id="circle_panel">
  288. <div class="toolset">
  289. <label id="tool_circle_cx">cx:
  290. <input id="circle_cx" class="attr_changer" title="Change circle's cx coordinate" size="3" data-attr="cx"/>
  291. </label>
  292. <label id="tool_circle_cy">cy:
  293. <input id="circle_cy" class="attr_changer" title="Change circle's cy coordinate" size="3" data-attr="cy"/>
  294. </label>
  295. </div>
  296. <div class="toolset">
  297. <label id="tool_circle_r">r:
  298. <input id="circle_r" class="attr_changer" title="Change circle's radius" size="3" data-attr="r"/>
  299. </label>
  300. </div>
  301. </div>
  302. <div id="ellipse_panel">
  303. <div class="toolset">
  304. <label id="tool_ellipse_cx">cx:
  305. <input id="ellipse_cx" class="attr_changer" title="Change ellipse's cx coordinate" size="3" data-attr="cx"/>
  306. </label>
  307. <label id="tool_ellipse_cy">cy:
  308. <input id="ellipse_cy" class="attr_changer" title="Change ellipse's cy coordinate" size="3" data-attr="cy"/>
  309. </label>
  310. </div>
  311. <div class="toolset">
  312. <label id="tool_ellipse_rx">rx:
  313. <input id="ellipse_rx" class="attr_changer" title="Change ellipse's x radius" size="3" data-attr="rx"/>
  314. </label>
  315. <label id="tool_ellipse_ry">ry:
  316. <input id="ellipse_ry" class="attr_changer" title="Change ellipse's y radius" size="3" data-attr="ry"/>
  317. </label>
  318. </div>
  319. </div>
  320. <div id="line_panel">
  321. <div class="toolset">
  322. <label id="tool_line_x1">x1:
  323. <input id="line_x1" class="attr_changer" title="Change line's starting x coordinate" size="3" data-attr="x1"/>
  324. </label>
  325. <label id="tool_line_y1">y1:
  326. <input id="line_y1" class="attr_changer" title="Change line's starting y coordinate" size="3" data-attr="y1"/>
  327. </label>
  328. </div>
  329. <div class="toolset">
  330. <label id="tool_line_x2">x2:
  331. <input id="line_x2" class="attr_changer" title="Change line's ending x coordinate" size="3" data-attr="x2"/>
  332. </label>
  333. <label id="tool_line_y2">y2:
  334. <input id="line_y2" class="attr_changer" title="Change line's ending y coordinate" size="3" data-attr="y2"/>
  335. </label>
  336. </div>
  337. </div>
  338. <div id="text_panel">
  339. <div class="toolset">
  340. <div class="tool_button" id="tool_bold" title="Bold Text [B]"><span></span>B</div>
  341. <div class="tool_button" id="tool_italic" title="Italic Text [I]"><span></span>i</div>
  342. </div>
  343. <div class="toolset" id="tool_font_family">
  344. <label>
  345. <!-- Font family -->
  346. <input id="font_family" type="text" title="Change Font Family" size="12"/>
  347. </label>
  348. <div id="font_family_dropdown" class="dropdown">
  349. <button></button>
  350. <ul>
  351. <li style="font-family:serif">Serif</li>
  352. <li style="font-family:sans-serif">Sans-serif</li>
  353. <li style="font-family:cursive">Cursive</li>
  354. <li style="font-family:fantasy">Fantasy</li>
  355. <li style="font-family:monospace">Monospace</li>
  356. </ul>
  357. </div>
  358. </div>
  359. <label id="tool_font_size" title="Change Font Size">
  360. <span id="font_sizeLabel" class="icon_label"></span>
  361. <input id="font_size" size="3" value="0" type="text"/>
  362. </label>
  363. <!-- Not visible, but still used -->
  364. <input id="text" type="text" size="35"/>
  365. </div>
  366. <!-- formerly gsvg_panel -->
  367. <div id="container_panel">
  368. <div class="tool_sep"></div>
  369. <!-- Add viewBox field here? -->
  370. <label id="group_title" title="Group identification label">
  371. <span>label:</span>
  372. <input id="g_title" data-attr="title" size="10" type="text"/>
  373. </label>
  374. </div>
  375. <div id="use_panel">
  376. <div class="push_button" id="tool_unlink_use" title="Break link to reference element (make unique)"></div>
  377. </div>
  378. <div id="g_panel">
  379. <div class="push_button" id="tool_ungroup" title="Ungroup Elements [G]"></div>
  380. </div>
  381. <!-- For anchor elements -->
  382. <div id="a_panel">
  383. <label id="tool_link_url" title="Set link URL (leave empty to remove)">
  384. <span id="linkLabel" class="icon_label"></span>
  385. <input id="link_url" type="text" size="35"/>
  386. </label>
  387. </div>
  388. <div id="path_node_panel">
  389. <div class="tool_sep"></div>
  390. <div class="tool_button push_button_pressed" id="tool_node_link" title="Link Control Points"></div>
  391. <div class="tool_sep"></div>
  392. <label id="tool_node_x">x:
  393. <input id="path_node_x" class="attr_changer" title="Change node's x coordinate" size="3" data-attr="x"/>
  394. </label>
  395. <label id="tool_node_y">y:
  396. <input id="path_node_y" class="attr_changer" title="Change node's y coordinate" size="3" data-attr="y"/>
  397. </label>
  398. <select id="seg_type" title="Change Segment type">
  399. <option id="straight_segments" selected="selected" value="4">Straight</option>
  400. <option id="curve_segments" value="6">Curve</option>
  401. </select>
  402. <div class="tool_button" id="tool_node_clone" title="Clone Node"></div>
  403. <div class="tool_button" id="tool_node_delete" title="Delete Node"></div>
  404. <div class="tool_button" id="tool_openclose_path" title="Open/close sub-path"></div>
  405. <div class="tool_button" id="tool_add_subpath" title="Add sub-path"></div>
  406. </div>
  407. </div> <!-- tools_top -->
  408. <div id="cur_context_panel">
  409. </div>
  410. <div id="tools_left" class="tools_panel">
  411. <div class="tool_button" id="tool_select" title="Select Tool"></div>
  412. <div class="tool_button" id="tool_fhpath" title="Pencil Tool"></div>
  413. <div class="tool_button" id="tool_line" title="Line Tool"></div>
  414. <div class="tool_button flyout_current" id="tools_rect_show" title="Square/Rect Tool">
  415. <div class="flyout_arrow_horiz"></div>
  416. </div>
  417. <div class="tool_button flyout_current" id="tools_ellipse_show" title="Ellipse/Circle Tool">
  418. <div class="flyout_arrow_horiz"></div>
  419. </div>
  420. <div class="tool_button" id="tool_path" title="Path Tool"></div>
  421. <div class="tool_button" id="tool_text" title="Text Tool"></div>
  422. <div class="tool_button" id="tool_image" title="Image Tool"></div>
  423. <div class="tool_button" id="tool_zoom" title="Zoom Tool [Ctrl+Up/Down]"></div>
  424. <div style="display: none">
  425. <div id="tool_rect" title="Rectangle"></div>
  426. <div id="tool_square" title="Square"></div>
  427. <div id="tool_fhrect" title="Free-Hand Rectangle"></div>
  428. <div id="tool_ellipse" title="Ellipse"></div>
  429. <div id="tool_circle" title="Circle"></div>
  430. <div id="tool_fhellipse" title="Free-Hand Ellipse"></div>
  431. </div>
  432. </div> <!-- tools_left -->
  433. <div id="tools_bottom" class="tools_panel">
  434. <!-- Zoom buttons -->
  435. <div id="zoom_panel" class="toolset" title="Change zoom level">
  436. <label>
  437. <span id="zoomLabel" class="zoom_tool icon_label"></span>
  438. <input id="zoom" size="3" value="100" type="text" />
  439. </label>
  440. <div id="zoom_dropdown" class="dropdown">
  441. <button></button>
  442. <ul>
  443. <li>1000%</li>
  444. <li>400%</li>
  445. <li>200%</li>
  446. <li>100%</li>
  447. <li>50%</li>
  448. <li>25%</li>
  449. <li id="fit_to_canvas" data-val="canvas">Fit to canvas</li>
  450. <li id="fit_to_sel" data-val="selection">Fit to selection</li>
  451. <li id="fit_to_layer_content" data-val="layer">Fit to layer content</li>
  452. <li id="fit_to_all" data-val="content">Fit to all content</li>
  453. <li>100%</li>
  454. </ul>
  455. </div>
  456. <div class="tool_sep"></div>
  457. </div>
  458. <div id="tools_bottom_2">
  459. <div id="color_tools">
  460. <div class="color_tool" id="tool_fill">
  461. <label class="icon_label" for="fill_color" title="Change fill color"></label>
  462. <div class="color_block">
  463. <div id="fill_bg"></div>
  464. <div id="fill_color" class="color_block"></div>
  465. </div>
  466. </div>
  467. <div class="color_tool" id="tool_stroke">
  468. <label class="icon_label" title="Change stroke color"></label>
  469. <div class="color_block">
  470. <div id="stroke_bg"></div>
  471. <div id="stroke_color" class="color_block" title="Change stroke color"></div>
  472. </div>
  473. <label class="stroke_label">
  474. <input id="stroke_width" title="Change stroke width by 1, shift-click to change by 0.1" size="2" value="5" type="text" data-attr="Stroke Width"/>
  475. </label>
  476. <div id="toggle_stroke_tools" title="Show/hide more stroke tools"></div>
  477. <label class="stroke_tool">
  478. <select id="stroke_style" title="Change stroke dash style">
  479. <option selected="selected" value="none">&#8212;</option>
  480. <option value="2,2">...</option>
  481. <option value="5,5">- -</option>
  482. <option value="5,2,2,2">- .</option>
  483. <option value="5,2,2,2,2,2">- ..</option>
  484. </select>
  485. </label>
  486. <div class="stroke_tool dropdown" id="stroke_linejoin">
  487. <div id="cur_linejoin" title="Linejoin: Miter"></div>
  488. <button></button>
  489. </div>
  490. <div class="stroke_tool dropdown" id="stroke_linecap">
  491. <div id="cur_linecap" title="Linecap: Butt"></div>
  492. <button></button>
  493. </div>
  494. </div>
  495. <div class="color_tool" id="tool_opacity" title="Change selected item opacity">
  496. <label>
  497. <span id="group_opacityLabel" class="icon_label"></span>
  498. <input id="group_opacity" size="3" value="100" type="text"/>
  499. </label>
  500. <div id="opacity_dropdown" class="dropdown">
  501. <button></button>
  502. <ul>
  503. <li>0%</li>
  504. <li>25%</li>
  505. <li>50%</li>
  506. <li>75%</li>
  507. <li>100%</li>
  508. <li class="special"><div id="opac_slider"></div></li>
  509. </ul>
  510. </div>
  511. </div>
  512. </div>
  513. </div>
  514. <div id="tools_bottom_3">
  515. <div id="palette_holder"><div id="palette" title="Click to change fill color, shift-click to change stroke color"></div></div>
  516. </div>
  517. <!-- <div id="copyright"><span id="copyrightLabel">Powered by</span> <a href="http://svg-edit.googlecode.com/" target="_blank">SVG-edit v2.6-alpha</a></div> --><!-- Comment for Chamilo -->
  518. </div>
  519. <div id="option_lists" class="dropdown">
  520. <ul id="linejoin_opts">
  521. <li class="tool_button current" id="linejoin_miter" title="Linejoin: Miter"></li>
  522. <li class="tool_button" id="linejoin_round" title="Linejoin: Round"></li>
  523. <li class="tool_button" id="linejoin_bevel" title="Linejoin: Bevel"></li>
  524. </ul>
  525. <ul id="linecap_opts">
  526. <li class="tool_button current" id="linecap_butt" title="Linecap: Butt"></li>
  527. <li class="tool_button" id="linecap_square" title="Linecap: Square"></li>
  528. <li class="tool_button" id="linecap_round" title="Linecap: Round"></li>
  529. </ul>
  530. <ul id="position_opts" class="optcols3">
  531. <li class="push_button" id="tool_posleft" title="Align Left"></li>
  532. <li class="push_button" id="tool_poscenter" title="Align Center"></li>
  533. <li class="push_button" id="tool_posright" title="Align Right"></li>
  534. <li class="push_button" id="tool_postop" title="Align Top"></li>
  535. <li class="push_button" id="tool_posmiddle" title="Align Middle"></li>
  536. <li class="push_button" id="tool_posbottom" title="Align Bottom"></li>
  537. </ul>
  538. </div>
  539. <!-- hidden divs -->
  540. <div id="color_picker"></div>
  541. </div> <!-- svg_editor -->
  542. <div id="svg_source_editor">
  543. <div class="overlay"></div>
  544. <div id="svg_source_container">
  545. <div id="tool_source_back" class="toolbar_button">
  546. <button id="tool_source_save">Apply Changes</button>
  547. <button id="tool_source_cancel">Cancel</button>
  548. </div>
  549. <div id="save_output_btns">
  550. <p id="copy_save_note">Copy the contents of this box into a text editor, then save the file with a .svg extension.</p>
  551. <button id="copy_save_done">Done</button>
  552. </div>
  553. <form>
  554. <textarea id="svg_source_textarea" spellcheck="false"></textarea>
  555. </form>
  556. </div>
  557. </div>
  558. <div id="svg_docprops">
  559. <div class="overlay"></div>
  560. <div id="svg_docprops_container">
  561. <div id="tool_docprops_back" class="toolbar_button">
  562. <button id="tool_docprops_save">OK</button>
  563. <button id="tool_docprops_cancel">Cancel</button>
  564. </div>
  565. <fieldset id="svg_docprops_docprops">
  566. <legend id="svginfo_image_props">Image Properties</legend>
  567. <label>
  568. <span id="svginfo_title">Title:</span>
  569. <input type="text" id="canvas_title"/>
  570. </label>
  571. <fieldset id="change_resolution">
  572. <legend id="svginfo_dim">Canvas Dimensions</legend>
  573. <label><span id="svginfo_width">width:</span> <input type="text" id="canvas_width" size="6"/></label>
  574. <label><span id="svginfo_height">height:</span> <input type="text" id="canvas_height" size="6"/></label>
  575. <label>
  576. <select id="resolution">
  577. <option id="selectedPredefined" selected="selected">Select predefined:</option>
  578. <option>640x480</option>
  579. <option>800x600</option>
  580. <option>1024x768</option>
  581. <option>1280x960</option>
  582. <option>1600x1200</option>
  583. <option id="fitToContent" value="content">Fit to Content</option>
  584. </select>
  585. </label>
  586. </fieldset>
  587. <fieldset id="image_save_opts">
  588. <legend id="includedImages">Included Images</legend>
  589. <label><input type="radio" name="image_opt" value="embed" checked="checked"/> <span id="image_opt_embed">Embed data (local files)</span> </label>
  590. <label><input type="radio" name="image_opt" value="ref"/> <span id="image_opt_ref">Use file reference</span> </label>
  591. </fieldset>
  592. </fieldset>
  593. </div>
  594. </div>
  595. <div id="svg_prefs">
  596. <div class="overlay"></div>
  597. <div id="svg_prefs_container">
  598. <div id="tool_prefs_back" class="toolbar_button">
  599. <button id="tool_prefs_save">OK</button>
  600. <button id="tool_prefs_cancel">Cancel</button>
  601. </div>
  602. <fieldset>
  603. <legend id="svginfo_editor_prefs">Editor Preferences</legend>
  604. <label><span id="svginfo_lang">Language:</span>
  605. <!-- Source: http://en.wikipedia.org/wiki/Language_names --><!-- Add for Chamilo bulgarian, (Български), hungarian (Magyar), indonesian (Bahasa Indonesia), italian (Italiano), latvian (Latviešu) -->
  606. <select id="lang_select">
  607. <option id="lang_ar" value="ar">العربية</option>
  608. <option id="lang_bg" value="bg">Български</option>
  609. <option id="lang_cs" value="cs">Čeština</option>
  610. <option id="lang_de" value="de">Deutsch</option>
  611. <option id="lang_en" value="en" selected="selected">English</option>
  612. <option id="lang_es" value="es">Español</option>
  613. <option id="lang_fa" value="fa">فارسی</option>
  614. <option id="lang_fr" value="fr">Français</option>
  615. <option id="lang_fy" value="fy">Frysk</option>
  616. <option id="lang_hi" value="hi">&#2361;&#2367;&#2344;&#2381;&#2342;&#2368;, &#2361;&#2367;&#2306;&#2342;&#2368;</option>
  617. <option id="lang_id" value="id">Bahasa Indonesia</option>
  618. <option id="lang_it" value="it">Italiano</option>
  619. <option id="lang_ja" value="ja">日本語</option>
  620. <option id="lang_lv" value="lv">Latviešu</option>
  621. <option id="lang_nl" value="nl">Nederlands</option>
  622. <option id="lang_pl" value="pl">Polski</option>
  623. <option id="lang_hu" value="hu">Magyar</option>
  624. <option id="lang_pt-BR" value="pt-BR">Português (BR)</option>
  625. <option id="lang_ro" value="ro">Română</option>
  626. <option id="lang_ru" value="ru">Русский</option>
  627. <option id="lang_sk" value="sk">Slovenčina</option>
  628. <option id="lang_sl" value="sl">Slovenščina</option>
  629. <option id="lang_zh-TW" value="zh-TW">繁體中文</option>
  630. </select>
  631. </label>
  632. <label><span id="svginfo_icons">Icon size:</span>
  633. <select id="iconsize">
  634. <option id="icon_small" value="s">Small</option>
  635. <option id="icon_medium" value="m" selected="selected">Medium</option>
  636. <option id="icon_large" value="l">Large</option>
  637. <option id="icon_xlarge" value="xl">Extra Large</option>
  638. </select>
  639. </label>
  640. <fieldset id="change_background">
  641. <legend id="svginfo_change_background">Editor Background</legend>
  642. <div id="bg_blocks"></div>
  643. <label><span id="svginfo_bg_url">URL:</span> <input type="text" id="canvas_bg_url"/></label>
  644. <p id="svginfo_bg_note">Note: Background will not be saved with image.</p>
  645. </fieldset>
  646. <fieldset id="change_grid">
  647. <legend id="svginfo_grid_settings">Grid</legend>
  648. <label><span id="svginfo_snap_onoff">Snapping on/off</span><input type="checkbox" value="snapping_on" id="grid_snapping_on"/></label>
  649. <label><span id="svginfo_snap_step">Snapping Step-Size:</span> <input type="text" id="grid_snapping_step" size="3" value="10"/></label>
  650. <label><span id="svginfo_grid_color">Grid color:</span> <input type="text" id="grid_color" size="3" value="#000"/></label>
  651. </fieldset>
  652. <fieldset id="units_rulers">
  653. <legend id="svginfo_units_rulers">Units &amp; Rulers</legend>
  654. <label><span id="svginfo_rulers_onoff">Show rulers</span><input type="checkbox" value="show_rulers" id="show_rulers" checked="checked"/></label>
  655. <label>
  656. <span id="svginfo_unit">Base Unit:</span>
  657. <select id="base_unit">
  658. <option value="px">Pixels</option>
  659. <option value="cm">Centimeters</option>
  660. <option value="mm">Millimeters</option>
  661. <option value="in">Inches</option>
  662. <option value="pt">Points</option>
  663. <option value="pc">Picas</option>
  664. <option value="em">Ems</option>
  665. <option value="ex">Exs</option>
  666. </select>
  667. </label>
  668. <!-- Should this be an export option instead? -->
  669. <!--
  670. <span id="svginfo_unit_system">Unit System:</span>
  671. <label>
  672. <input type="radio" name="unit_system" value="single" checked="checked"/>
  673. <span id="svginfo_single_type_unit">Single type unit</span>
  674. <small id="svginfo_single_type_unit_sub">CSS unit type is set on root element. If a different unit type is entered in a text field, it is converted back to user units on export.</small>
  675. </label>
  676. <label>
  677. <input type="radio" name="unit_system" value="multi"/>
  678. <span id="svginfo_multi_units">Multiple CSS units</span>
  679. <small id="svginfo_single_type_unit_sub">Attributes can be given different CSS units, which may lead to inconsistant results among viewers.</small>
  680. </label>
  681. -->
  682. </fieldset>
  683. </fieldset>
  684. </div>
  685. </div>
  686. <div id="dialog_box">
  687. <div class="overlay"></div>
  688. <div id="dialog_container">
  689. <div id="dialog_content"></div>
  690. <div id="dialog_buttons"></div>
  691. </div>
  692. </div>
  693. <ul id="cmenu_canvas" class="contextMenu">
  694. <li><a href="#cut">Cut</a></li>
  695. <li><a href="#copy">Copy</a></li>
  696. <li><a href="#paste">Paste</a></li>
  697. <li><a href="#paste_in_place">Paste in Place</a></li>
  698. <li class="separator"><a href="#delete">Delete</a></li>
  699. <li class="separator"><a href="#group">Group<span class="shortcut">G</span></a></li>
  700. <li><a href="#ungroup">Ungroup<span class="shortcut">G</span></a></li>
  701. <li class="separator"><a href="#move_front">Bring to Front<span class="shortcut">SHFT+CTRL+]</span></a></li>
  702. <li><a href="#move_up">Bring Forward<span class="shortcut">CTRL+]</span></a></li>
  703. <li><a href="#move_down">Send Backward<span class="shortcut">CTRL+[</span></a></li>
  704. <li><a href="#move_back">Send to Back<span class="shortcut">SHFT+CTRL+[</span></a></li>
  705. </ul>
  706. <ul id="cmenu_layers" class="contextMenu">
  707. <li><a href="#dupe">Duplicate Layer...</a></li>
  708. <li><a href="#delete">Delete Layer</a></li>
  709. <li><a href="#merge_down">Merge Down</a></li>
  710. <li><a href="#merge_all">Merge All</a></li>
  711. </ul>
  712. </body>
  713. </html>