PageRenderTime 61ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 1ms

/wp-content/plugins/LayerSlider/builder.php

https://github.com/alniko009/magic
PHP | 1133 lines | 1090 code | 31 blank | 12 comment | 111 complexity | f7a35cbf660e67dfce6d7baf896c5ac8 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1

Large files files are truncated, but you can click here to view the full file

  1. <?php
  2. // Custom transitions file
  3. $upload_dir = wp_upload_dir();
  4. $custom_trs = $upload_dir['basedir'] . '/layerslider.custom.transitions.js';
  5. // Sample transitions file
  6. $sample_trs = dirname(__FILE__) . '/sampleslider/sample_transitions.js';
  7. // Get transition file
  8. if(file_exists($custom_trs)) {
  9. $data = file_get_contents($custom_trs);
  10. } else {
  11. $data = file_get_contents($sample_trs);
  12. }
  13. // Get JSON part
  14. $data = substr($data, 35);
  15. $data = substr($data, 0, -1);
  16. // Parse data
  17. $data = json_decode($data, true);
  18. // Get screen options
  19. $lsScreenOptions = get_option('lsScreenOptions', '0');
  20. $lsScreenOptions = ($lsScreenOptions == 0) ? array() : $lsScreenOptions;
  21. $lsScreenOptions = is_array($lsScreenOptions) ? $lsScreenOptions : unserialize($lsScreenOptions);
  22. // Defaults
  23. if(!isset($lsScreenOptions['showTooltips'])) {
  24. $lsScreenOptions['showTooltips'] = 'true';
  25. }
  26. // Debug
  27. //print_r($data);
  28. // Function to convert array keys to property names
  29. function lsTrGetProperty($key) {
  30. switch ($key) {
  31. case 'scale3d' :
  32. return 'Scale3D';
  33. break;
  34. case 'rotateX' :
  35. return 'RotateX';
  36. break;
  37. case 'rotateY' :
  38. return 'RotateY';
  39. break;
  40. case 'x' :
  41. return 'MoveX';
  42. break;
  43. case 'y' :
  44. return 'MoveY';
  45. break;
  46. case 'delay' :
  47. return 'Delay';
  48. break;
  49. default :
  50. return $key;
  51. break;
  52. }
  53. }
  54. ?>
  55. <div id="ls-screen-options" class="metabox-prefs hidden">
  56. <div id="screen-options-wrap" class="hidden">
  57. <form id="ls-screen-options-form" action="<?php echo $_SERVER['REQUEST_URI']?>" method="post">
  58. <h5>Show on screen</h5>
  59. <label>
  60. <input type="checkbox" name="showTooltips"<?php echo $lsScreenOptions['showTooltips'] == 'true' ? ' checked="checked"' : ''?>> Tooltips
  61. </label>
  62. </form>
  63. </div>
  64. <div id="screen-options-link-wrap" class="hide-if-no-js screen-meta-toggle">
  65. <a href="#screen-options-wrap" id="show-settings-link" class="show-settings">Screen Options</a>
  66. </div>
  67. </div>
  68. <div id="ls-tr-sample-3d">
  69. <div class="ls-transition-item">
  70. <table class="ls-box ls-tr-settings">
  71. <thead>
  72. <tr>
  73. <td colspan="4"><?php _e('Preview', 'LayerSlider') ?></td>
  74. </tr>
  75. </thead>
  76. <tbody>
  77. <tr>
  78. <td colspan="4">
  79. <div class="ls-builder-preview ls-transition-preview">
  80. <img src="<?php echo $GLOBALS['lsPluginPath'] ?>img/sample_slide_1.png" alt="preview image">
  81. </div>
  82. <div class="ls-builder-preview-button">
  83. <button class="button">Enter Preview</button>
  84. </div>
  85. </td>
  86. </tr>
  87. </tbody>
  88. <thead>
  89. <tr>
  90. <td colspan="4"><?php _e('Basic properties', 'LayerSlider') ?></td>
  91. </tr>
  92. </thead>
  93. <tbody class="basic">
  94. <tr>
  95. <td class="right"><?php _e('Transition name', 'LayerSlider') ?></td>
  96. <td colspan="3"><input type="text" name="name" value="Turn top" data-help="<?php _e('The name of your custom transition. When you will edit a slider, it will appear with this name, so you can easily identify the individual transitions.', 'LayerSlider') ?>"></td>
  97. </tr>
  98. <tr>
  99. <td class="right"><?php _e('Rows', 'LayerSlider') ?></td>
  100. <td><input type="text" name="rows" value="1" data-help="<?php _e('<number> or <min_number>,<max_number> If you specify a value greater than 1, LayerSlider will cut your slide into tiles. You can specify here how many rows of your transition should have. If you specify two numbers separated with a comma, LayerSlider will use that as a range and pick a random number between your values.', 'LayerSlider') ?>"></td>
  101. <td class="right"><?php _e('Cols', 'LayerSlider') ?></td>
  102. <td><input type="text" name="cols" value="1" data-help="<?php _e('<number> or <min_number>,<max_number> If you specify a value greater than 1, LayerSlider will cut your slide into tiles. You can specify here how many columns of your transition should have. If you specify two numbers separated with a comma, LayerSlider will use that as a range and pick a random number between your values.', 'LayerSlider') ?>"></td>
  103. </tr>
  104. </tbody>
  105. <thead>
  106. <tr>
  107. <td colspan="4"><?php _e('Tiles', 'LayerSlider') ?></td>
  108. </tr>
  109. </thead>
  110. <tbody class="tile">
  111. <tr>
  112. <td class="right"><?php _e('Delay', 'LayerSlider') ?></td>
  113. <td><input type="text" name="delay" value="75" data-help="<?php _e('You can apply a delay between the tiles and postpone their animation relative to each other.', 'LayerSlider') ?>"></td>
  114. <td class="right"><?php _e('Sequence', 'LayerSlider') ?></td>
  115. <td>
  116. <select name="sequence" data-help="<?php _e('You can control the animation order of the tiles here.', 'LayerSlider') ?>">
  117. <option value="forward"><?php _e('Forward', 'LayerSlider') ?></option>
  118. <option value="reverse"><?php _e('Reverse', 'LayerSlider') ?></option>
  119. <option value="col-forward"><?php _e('Col-forward', 'LayerSlider') ?></option>
  120. <option value="col-reverse"><?php _e('Col-reverse', 'LayerSlider') ?></option>
  121. <option value="random"><?php _e('Random', 'LayerSlider') ?></option>
  122. </select>
  123. </td>
  124. </tr>
  125. <tr>
  126. <td></td>
  127. <td></td>
  128. <td class="right"><?php _e('Depth', 'LayerSlider') ?></td>
  129. <td>
  130. <label data-help="<?php _e('The script will try to identify the optimal depth for your rotated objects (tiles). With this option, you can force your objects to have large depth when performing 180 degree (and its multiplies) rotation.', 'LayerSlider') ?>">
  131. <input type="checkbox" class="checkbox" name="depth" value="large">
  132. Large depth
  133. </label>
  134. </td>
  135. </tr>
  136. </tbody>
  137. <thead>
  138. <tr>
  139. <td colspan="4">
  140. <?php _e('Before animation', 'LayerSlider') ?>
  141. <p class="ls-builder-checkbox">
  142. <label><input type="checkbox" class="ls-builder-collapse-toggle"> Enabled</label>
  143. </p>
  144. </td>
  145. </tr>
  146. </thead>
  147. <tbody class="before ls-builder-collapsed">
  148. <tr>
  149. <td class="right"><?php _e('Duration', 'LayerSlider') ?></td>
  150. <td><input type="text" name="duration" value="1000" data-help="<?php _e('The duration of your animation. This value is in millisecs, so the value 1000 means 1 second.', 'LayerSlider') ?>"></td>
  151. <td class="right"><a href="http://easings.net/" target="_blank"><?php _e('Easing', 'LayerSlider') ?></a></td>
  152. <td>
  153. <select name="easing" data-help="<?php _e('The timing function of the animation, with it you can manipualte the movement of the animated object. Please click on the link next to this select field to open easings.net for more information and real-time examples.', 'LayerSlider') ?>">
  154. <option>linear</option>
  155. <option>easeInQuad</option>
  156. <option>easeOutQuad</option>
  157. <option>easeInOutQuad</option>
  158. <option>easeInCubic</option>
  159. <option>easeOutCubic</option>
  160. <option>easeInOutCubic</option>
  161. <option>easeInQuart</option>
  162. <option>easeOutQuart</option>
  163. <option>easeInOutQuart</option>
  164. <option>easeInQuint</option>
  165. <option>easeOutQuint</option>
  166. <option selected="selected">easeInOutQuint</option>
  167. <option>easeInSine</option>
  168. <option>easeOutSine</option>
  169. <option>easeInOutSine</option>
  170. <option>easeInExpo</option>
  171. <option>easeOutExpo</option>
  172. <option>easeInOutExpo</option>
  173. <option>easeInCirc</option>
  174. <option>easeOutCirc</option>
  175. <option>easeInOutCirc</option>
  176. <option>easeInBack</option>
  177. <option>easeOutBack</option>
  178. <option>easeInOutBack</option>
  179. </select>
  180. </td>
  181. </tr>
  182. <tr class="transition">
  183. <td colspan="4">
  184. <ul class="ls-tr-tags"></ul>
  185. <p class="ls-tr-add-property">
  186. <a href="#" class="ls-icon-tr-add"><?php _e('Add new', 'LayerSlider') ?></a>
  187. <select>
  188. <option value="scale3d,0.8"><?php _e('Scale3D', 'LayerSlider') ?></option>
  189. <option value="rotateX,90"><?php _e('RotateX', 'LayerSlider') ?></option>
  190. <option value="rotateY,90"><?php _e('RotateY', 'LayerSlider') ?></option>
  191. <option value="delay,200"><?php _e('Delay', 'LayerSlider') ?></option>
  192. </select>
  193. </p>
  194. </td>
  195. </tr>
  196. </tbody>
  197. <thead>
  198. <tr>
  199. <td colspan="4">
  200. <?php _e('Animation', 'LayerSlider') ?>
  201. </td>
  202. </tr>
  203. </thead>
  204. <tbody class="animation">
  205. <tr>
  206. <td class="right"><?php _e('Duration', 'LayerSlider') ?></td>
  207. <td><input type="text" name="duration" value="1000" data-help="<?php _e('The duration of your animation. This value is in millisecs, so the value 1000 means 1 second.', 'LayerSlider') ?>"></td>
  208. <td class="right"><a href="http://easings.net/" target="_blank"><?php _e('Easing', 'LayerSlider') ?></a></td>
  209. <td>
  210. <select name="easing" data-help="<?php _e('The timing function of the animation, with it you can manipualte the movement of the animated object. Please click on the link next to this select field to open easings.net for more information and real-time examples.', 'LayerSlider') ?>">
  211. <option>linear</option>
  212. <option>easeInQuad</option>
  213. <option>easeOutQuad</option>
  214. <option>easeInOutQuad</option>
  215. <option>easeInCubic</option>
  216. <option>easeOutCubic</option>
  217. <option>easeInOutCubic</option>
  218. <option>easeInQuart</option>
  219. <option>easeOutQuart</option>
  220. <option>easeInOutQuart</option>
  221. <option>easeInQuint</option>
  222. <option>easeOutQuint</option>
  223. <option selected="selected">easeInOutQuint</option>
  224. <option>easeInSine</option>
  225. <option>easeOutSine</option>
  226. <option>easeInOutSine</option>
  227. <option>easeInExpo</option>
  228. <option>easeOutExpo</option>
  229. <option>easeInOutExpo</option>
  230. <option>easeInCirc</option>
  231. <option>easeOutCirc</option>
  232. <option>easeInOutCirc</option>
  233. <option>easeInBack</option>
  234. <option>easeOutBack</option>
  235. <option>easeInOutBack</option>
  236. </select>
  237. </td>
  238. </tr>
  239. <tr>
  240. <td></td>
  241. <td></td>
  242. <td class="right"><?php _e('Direction', 'LayerSlider') ?></td>
  243. <td>
  244. <select name="direction" data-help="<?php _e('The direction of rotation.', 'LayerSlider') ?>">
  245. <option value="vertical"><?php _e('Vertical', 'LayerSlider'); ?></option>
  246. <option value="horizontal" selected="selected"><?php _e('Horizontal', 'LayerSlider') ?></option>
  247. </select>
  248. </td>
  249. </tr>
  250. <tr class="transition">
  251. <td colspan="4">
  252. <ul class="ls-tr-tags">
  253. <li>
  254. <p>
  255. <span><?php _e('RotateX', 'LayerSlider') ?></span>
  256. <input type="text" name="rotateY" value="90">
  257. </p>
  258. <a href="#">x</a>
  259. </li>
  260. </ul>
  261. <p class="ls-tr-add-property">
  262. <a href="#" class="ls-icon-tr-add"><?php _e('Add new', 'LayerSlider') ?></a>
  263. <select>
  264. <option value="scale3d,0.8"><?php _e('Scale3D', 'LayerSlider') ?></option>
  265. <option value="rotateX,90"><?php _e('RotateX', 'LayerSlider') ?></option>
  266. <option value="rotateY,90"><?php _e('RotateY', 'LayerSlider') ?></option>
  267. <option value="delay,200"><?php _e('Delay', 'LayerSlider') ?></option>
  268. </select>
  269. </p>
  270. </td>
  271. </tr>
  272. </tbody>
  273. <thead>
  274. <tr>
  275. <td colspan="4">
  276. <?php _e('After animation', 'LayerSlider') ?>
  277. <p class="ls-builder-checkbox">
  278. <label><input type="checkbox" class="ls-builder-collapse-toggle"> Enabled</label>
  279. </p>
  280. </td>
  281. </tr>
  282. </thead>
  283. <tbody class="after ls-builder-collapsed">
  284. <tr>
  285. <td class="right"><?php _e('Duration', 'LayerSlider') ?></td>
  286. <td><input type="text" name="duration" value="1000" data-help="<?php _e('The duration of your animation. This value is in millisecs, so the value 1000 means 1 second.', 'LayerSlider') ?>"></td>
  287. <td class="right"><a href="http://easings.net/" target="_blank"><?php _e('Easing', 'LayerSlider') ?></a></td>
  288. <td>
  289. <select name="easing" data-help="<?php _e('The timing function of the animation, with it you can manipualte the movement of the animated object. Please click on the link next to this select field to open easings.net for more information and real-time examples.', 'LayerSlider') ?>">
  290. <option>linear</option>
  291. <option>easeInQuad</option>
  292. <option>easeOutQuad</option>
  293. <option>easeInOutQuad</option>
  294. <option>easeInCubic</option>
  295. <option>easeOutCubic</option>
  296. <option>easeInOutCubic</option>
  297. <option>easeInQuart</option>
  298. <option>easeOutQuart</option>
  299. <option>easeInOutQuart</option>
  300. <option>easeInQuint</option>
  301. <option>easeOutQuint</option>
  302. <option selected="selected">easeInOutQuint</option>
  303. <option>easeInSine</option>
  304. <option>easeOutSine</option>
  305. <option>easeInOutSine</option>
  306. <option>easeInExpo</option>
  307. <option>easeOutExpo</option>
  308. <option>easeInOutExpo</option>
  309. <option>easeInCirc</option>
  310. <option>easeOutCirc</option>
  311. <option>easeInOutCirc</option>
  312. <option>easeInBack</option>
  313. <option>easeOutBack</option>
  314. <option>easeInOutBack</option>
  315. </select>
  316. </td>
  317. </tr>
  318. <tr class="transition">
  319. <td colspan="4">
  320. <ul class="ls-tr-tags"></ul>
  321. <p class="ls-tr-add-property">
  322. <a href="#" class="ls-icon-tr-add"><?php _e('Add new', 'LayerSlider') ?></a>
  323. <select>
  324. <option value="scale3d,0.8"><?php _e('Scale3D', 'LayerSlider') ?></option>
  325. <option value="rotateX,90"><?php _e('RotateX', 'LayerSlider') ?></option>
  326. <option value="rotateY,90"><?php _e('RotateY', 'LayerSlider') ?></option>
  327. <option value="delay,200"><?php _e('Delay', 'LayerSlider') ?></option>
  328. </select>
  329. </p>
  330. </td>
  331. </tr>
  332. </tbody>
  333. <thead>
  334. <tr>
  335. <td colspan="4"><?php _e('Transition options', 'LayerSlider') ?></td>
  336. </tr>
  337. </thead>
  338. <tbody>
  339. <tr>
  340. <td colspan="4">
  341. <button class="button-primary ls-tr-remove right"><?php _e('Remove transition', 'LayerSlider') ?></button>
  342. </td>
  343. </tr>
  344. </tbody>
  345. </table>
  346. </div>
  347. </div>
  348. <div id="ls-tr-sample-2d">
  349. <div class="ls-transition-item">
  350. <table class="ls-box ls-tr-settings bottomborder">
  351. <thead>
  352. <tr>
  353. <td colspan="4"><?php _e('Preview', 'LayerSlider') ?></td>
  354. </tr>
  355. </thead>
  356. <tbody>
  357. <tr>
  358. <td colspan="4">
  359. <div class="ls-builder-preview ls-transition-preview">
  360. <img src="<?php echo $GLOBALS['lsPluginPath'] ?>img/sample_slide_1.png" alt="preview image">
  361. </div>
  362. <div class="ls-builder-preview-button">
  363. <button class="button">Enter Preview</button>
  364. </div>
  365. </td>
  366. </tr>
  367. </tbody>
  368. <thead>
  369. <tr>
  370. <td colspan="4"><?php _e('Basic properties', 'LayerSlider') ?></td>
  371. </tr>
  372. </thead>
  373. <tbody class="basic">
  374. <tr>
  375. <td class="right"><?php _e('Transition name', 'LayerSlider') ?></td>
  376. <td colspan="3"><input type="text" name="name" value="Turn top" data-help="<?php _e('The name of your custom transition. When you will edit a slider, it will appear with this name, so you can easily identify the individual transitions.', 'LayerSlider') ?>"></td>
  377. </tr>
  378. <tr>
  379. <td class="right"><?php _e('Rows', 'LayerSlider') ?></td>
  380. <td><input type="text" name="rows" value="1" data-help="<?php _e('<number> or <min_number>,<max_number> If you specify a value greater than 1, LayerSlider will cut your slide into tiles. You can specify here how many rows of your transition should have. If you specify two numbers separated with a comma, LayerSlider will use that as a range and pick a random number between your values.', 'LayerSlider') ?>"></td>
  381. <td class="right"><?php _e('Cols', 'LayerSlider') ?></td>
  382. <td><input type="text" name="cols" value="1" data-help="<?php _e('<number> or <min_number>,<max_number> If you specify a value greater than 1, LayerSlider will cut your slide into tiles. You can specify here how many columns of your transition should have. If you specify two numbers separated with a comma, LayerSlider will use that as a range and pick a random number between your values.', 'LayerSlider') ?>"></td>
  383. </tr>
  384. </tbody>
  385. <thead>
  386. <tr>
  387. <td colspan="4"><?php _e('Tiles', 'LayerSlider') ?></td>
  388. </tr>
  389. </thead>
  390. <tbody class="tile">
  391. <tr>
  392. <td class="right"><?php _e('Delay', 'LayerSlider') ?></td>
  393. <td><input type="text" name="delay" value="75" data-help="<?php _e('You can apply a delay between the tiles and postpone their animation relative to each other.', 'LayerSlider') ?>"></td>
  394. <td class="right"><?php _e('Sequence', 'LayerSlider') ?></td>
  395. <td>
  396. <select name="sequence" data-help="<?php _e('You can control the animation order of the tiles here.', 'LayerSlider') ?>">
  397. <option value="forward"><?php _e('Forward', 'LayerSlider') ?></option>
  398. <option value="reverse"><?php _e('Reverse', 'LayerSlider') ?></option>
  399. <option value="col-forward"><?php _e('Col-forward', 'LayerSlider') ?></option>
  400. <option value="col-reverse"><?php _e('Col-reverse', 'LayerSlider') ?></option>
  401. <option value="random"><?php _e('Random', 'LayerSlider') ?></option>
  402. </select>
  403. </td>
  404. </tr>
  405. </tbody>
  406. <thead>
  407. <tr>
  408. <td colspan="4"><?php _e('Transition', 'LayerSlider') ?></td>
  409. </tr>
  410. </thead>
  411. <tbody class="transition">
  412. <tr>
  413. <td class="right"><?php _e('Duration', 'LayerSlider') ?></td>
  414. <td><input type="text" name="duration" value="1000" data-help="<?php _e('The duration of the animation. This value is in millisecs, so the value 1000 measn 1 second.', 'LayerSlider') ?>"></td>
  415. <td class="right"><a href="http://easings.net/" target="_blank"><?php _e('Easing', 'LayerSlider') ?></a></td>
  416. <td>
  417. <select name="easing" data-help="<?php _e('The timing function of the animation, with it you can manipualte the movement of the animated object. Please click on the link next to this select field to open easings.net for more information and real-time examples.', 'LayerSlider') ?>">
  418. <option>linear</option>
  419. <option>swing</option>
  420. <option>easeInQuad</option>
  421. <option>easeOutQuad</option>
  422. <option>easeInOutQuad</option>
  423. <option>easeInCubic</option>
  424. <option>easeOutCubic</option>
  425. <option>easeInOutCubic</option>
  426. <option>easeInQuart</option>
  427. <option>easeOutQuart</option>
  428. <option>easeInOutQuart</option>
  429. <option>easeInQuint</option>
  430. <option>easeOutQuint</option>
  431. <option selected="selected">easeInOutQuint</option>
  432. <option>easeInSine</option>
  433. <option>easeOutSine</option>
  434. <option>easeInOutSine</option>
  435. <option>easeInExpo</option>
  436. <option>easeOutExpo</option>
  437. <option>easeInOutExpo</option>
  438. <option>easeInCirc</option>
  439. <option>easeOutCirc</option>
  440. <option>easeInOutCirc</option>
  441. <option>easeInElastic</option>
  442. <option>easeOutElastic</option>
  443. <option>easeInOutElastic</option>
  444. <option>easeInBack</option>
  445. <option>easeOutBack</option>
  446. <option>easeInOutBack</option>
  447. <option>easeInBounce</option>
  448. <option>easeOutBounce</option>
  449. <option>easeInOutBounce</option>
  450. </select>
  451. </td>
  452. </tr>
  453. <tr>
  454. <td class="right"><?php _e('Type', 'LayerSlider') ?></td>
  455. <td>
  456. <select name="type" data-help="<?php _e('The type of the animation, either slide, fade or both (mixed).', 'LayerSlider') ?>">
  457. <option value="slide"><?php _e('Slide', 'LayerSlider') ?></option>
  458. <option value="fade"><?php _e('Fade', 'LayerSlider') ?></option>
  459. <option value="mixed"><?php _e('Mixed', 'LayerSlider') ?></option>
  460. </select>
  461. </td>
  462. <td class="right"><?php _e('Direction', 'LayerSlider') ?></td>
  463. <td>
  464. <select name="direction" data-help="<?php _e('The direction of the slide or mixed animation if you chose these type in the previous setting.', 'LayerSlider') ?>">
  465. <option value="top"><?php _e('Top', 'LayerSlider') ?></option>
  466. <option value="right"><?php _e('Right', 'LayerSlider') ?></option>
  467. <option value="bottom"><?php _e('Bottom', 'LayerSlider') ?></option>
  468. <option value="left"><?php _e('Left', 'LayerSlider') ?></option>
  469. <option value="random"><?php _e('Random', 'LayerSlider') ?></option>
  470. <option value="topleft"><?php _e('Top left', 'LayerSlider') ?></option>
  471. <option value="topright"><?php _e('Top right', 'LayerSlider') ?></option>
  472. <option value="bottomleft"><?php _e('Bottom left', 'LayerSlider') ?></option>
  473. <option value="bottomright"><?php _e('Bottom right', 'LayerSlider') ?></option>
  474. </select>
  475. </td>
  476. </tr>
  477. <tr>
  478. <td class="right"><?php _e('RotateX', 'LayerSlider') ?></td>
  479. <td><input type="text" name="rotateX" value="0" data-help="The initial rotation of the individual tiles which will be animated to the default (0deg) value around the X axis. You can use negatuve values."></td>
  480. <td class="right"><?php _e('RotateY', 'LayerSlider') ?></td>
  481. <td><input type="text" name="rotateY" value="0" data-help="The initial rotation of the individual tiles which will be animated to the default (0deg) value around the Y axis. You can use negatuve values."></td>
  482. </tr>
  483. <tr>
  484. <td class="right"><?php _e('RotateZ', 'LayerSlider') ?></td>
  485. <td><input type="text" name="rotate" value="0" data-help="The initial rotation of the individual tiles which will be animated to the default (0deg) value around the Z axis. You can use negatuve values."></td>
  486. <td class="right"><?php _e('Scale', 'LayerSlider') ?></td>
  487. <td><input type="text" name="scale" value="1.0" data-help="The initial scale of the individual tiles which will be animated to the default (1.0) value."></td>
  488. </tr>
  489. </tbody>
  490. <thead>
  491. <tr>
  492. <td colspan="4"><?php _e('Transition options', 'LayerSlider') ?></td>
  493. </tr>
  494. </thead>
  495. <tbody>
  496. <tr>
  497. <td colspan="4">
  498. <button class="button-primary ls-tr-remove"><?php _e('Remove transition', 'LayerSlider') ?></button>
  499. </td>
  500. </tr>
  501. </tbody>
  502. </table>
  503. </div>
  504. </div>
  505. <div class="wrap">
  506. <!-- Page title -->
  507. <div class="ls-icon-layers"></div>
  508. <h2>
  509. <?php _e('LayerSlider Transition Builder', 'LayerSlider') ?>
  510. <a href="?page=layerslider" class="add-new-h2"><?php _e('Back to the list', 'LayerSlider') ?></a>
  511. </h2>
  512. <?php if(isset($_GET['edited'])) : ?>
  513. <div class="updated"><?php _e('Your changes has been saved!', 'LayerSlider') ?></div>
  514. <?php endif; ?>
  515. <!-- Editor box -->
  516. <form action="<?php echo $_SERVER['REQUEST_URI'] ?>" method="post" id="ls-tr-builder-form">
  517. <input type="hidden" name="posted_ls_transition_builder" value="1">
  518. <div class="ls-box ls-tr-builder">
  519. <h3 class="header">
  520. <div class="ls-builder-left ls-half">
  521. <div class="inner">
  522. <?php _e('3D transitions', 'LayerSlider') ?>
  523. <p>
  524. <?php _e('Choose:', 'LayerSlider') ?>
  525. <select class="ls-tr-builder-tr-select 3d">
  526. <?php if(isset($data['t3d']) && !empty($data['t3d'])) : ?>
  527. <?php foreach($data['t3d'] as $tr) : ?>
  528. <option><?php echo $tr['name'] ?></option>
  529. <?php endforeach; ?>
  530. <?php else : ?>
  531. <option class="notification">No 3D transitions yet</option>
  532. <?php endif; ?>
  533. </select>
  534. <?php _e('or', 'LayerSlider') ?>
  535. <a href="#" class="ls-icon-tr-add ls-tr-builder-add-tr 3d"><?php _e('Add new', 'LayerSlider') ?></a>
  536. </p>
  537. </div>
  538. </div>
  539. <div class="ls-builder-right ls-half">
  540. <div class="inner">
  541. <?php _e('2D transitions', 'LayerSlider') ?>
  542. <p>
  543. <?php _e('Choose:', 'LayerSlider') ?>
  544. <select class="ls-tr-builder-tr-select 2d">
  545. <?php if(isset($data['t2d']) && !empty($data['t2d'])) : ?>
  546. <?php foreach($data['t2d'] as $tr) : ?>
  547. <option><?php echo $tr['name'] ?></option>
  548. <?php endforeach; ?>
  549. <?php else : ?>
  550. <option class="notification">No 2D transitions yet</option>
  551. <?php endif; ?>
  552. </select>
  553. <?php _e('or', 'LayerSlider') ?>
  554. <a href="#" class="ls-icon-tr-add ls-tr-builder-add-tr 2d"><?php _e('Add new', 'LayerSlider') ?></a>
  555. </p>
  556. </div>
  557. </div>
  558. </h3>
  559. <div class="ls-tr-options">
  560. <div class="ls-builder-left ls-tr-list-3d">
  561. <?php if(isset($data['t3d']) && !empty($data['t3d'])) : ?>
  562. <?php foreach($data['t3d'] as $key => $tr) : ?>
  563. <?php $activeClass = ($key == 0) ? ' active' : '' ?>
  564. <div class="ls-transition-item<?php echo $activeClass ?>">
  565. <table class="ls-box ls-tr-settings">
  566. <thead>
  567. <tr>
  568. <td colspan="4"><?php _e('Preview', 'LayerSlider') ?></td>
  569. </tr>
  570. </thead>
  571. <tbody>
  572. <tr>
  573. <td colspan="4">
  574. <div class="ls-builder-preview ls-transition-preview">
  575. <img src="<?php echo $GLOBALS['lsPluginPath'] ?>img/sample_slide_1.png" alt="preview image">
  576. </div>
  577. <div class="ls-builder-preview-button">
  578. <button class="button">Enter Preview</button>
  579. </div>
  580. </td>
  581. </tr>
  582. </tbody>
  583. <thead>
  584. <tr>
  585. <td colspan="4"><?php _e('Basic properties', 'LayerSlider') ?></td>
  586. </tr>
  587. </thead>
  588. <tbody class="basic">
  589. <tr>
  590. <td class="right"><?php _e('Transition name', 'LayerSlider') ?></td>
  591. <td colspan="3"><input type="text" name="name" value="<?php echo $tr['name'] ?>" data-help="<?php _e('The name of your custom transition. When you will edit a slider, it will appear with this name, so you can easily identify the individual transitions.', 'LayerSlider') ?>"></td>
  592. </tr>
  593. <tr>
  594. <?php $tr['rows'] = is_array($tr['rows']) ? implode(',', $tr['rows']) : $tr['rows']; ?>
  595. <?php $tr['cols'] = is_array($tr['cols']) ? implode(',', $tr['cols']) : $tr['cols']; ?>
  596. <td class="right"><?php _e('Rows', 'LayerSlider') ?></td>
  597. <td><input type="text" name="rows" value="<?php echo $tr['rows'] ?>" data-help="<?php _e('<number> or <min_number>,<max_number> If you specify a value greater than 1, LayerSlider will cut your slide into tiles. You can specify here how many rows of your transition should have. If you specify two numbers separated with a comma, LayerSlider will use that as a range and pick a random number between your values.', 'LayerSlider') ?>"></td>
  598. <td class="right"><?php _e('Cols', 'LayerSlider') ?></td>
  599. <td><input type="text" name="cols" value="<?php echo $tr['cols'] ?>" data-help="<?php _e('<number> or <min_number>,<max_number> If you specify a value greater than 1, LayerSlider will cut your slide into tiles. You can specify here how many columns of your transition should have. If you specify two numbers separated with a comma, LayerSlider will use that as a range and pick a random number between your values.', 'LayerSlider') ?>"></td>
  600. </tr>
  601. </tbody>
  602. <thead>
  603. <tr>
  604. <td colspan="4"><?php _e('Tiles', 'LayerSlider') ?></td>
  605. </tr>
  606. </thead>
  607. <tbody class="tile">
  608. <tr>
  609. <td class="right"><?php _e('Delay', 'LayerSlider') ?></td>
  610. <td><input type="text" name="delay" value="<?php echo $tr['tile']['delay'] ?>" data-help="<?php _e('You can apply a delay between the tiles and postpone their animation relative to each other.', 'LayerSlider') ?>"></td>
  611. <td class="right"><?php _e('Sequence', 'LayerSlider') ?></td>
  612. <td>
  613. <select name="sequence" data-help="<?php _e('You can control the animation order of the tiles here.', 'LayerSlider') ?>">
  614. <option value="forward"<?php echo ($tr['tile']['sequence'] == 'forward') ? ' selected="selected"' : '' ?>><?php _e('Forward', 'LayerSlider') ?></option>
  615. <option value="reverse"<?php echo ($tr['tile']['sequence'] == 'reverse') ? ' selected="selected"' : '' ?>><?php _e('Reverse', 'LayerSlider') ?></option>
  616. <option value="col-forward"<?php echo ($tr['tile']['sequence'] == 'col-forward') ? ' selected="selected"' : '' ?>><?php _e('Col-forward', 'LayerSlider') ?></option>
  617. <option value="col-reverse"<?php echo ($tr['tile']['sequence'] == 'col-reverse') ? ' selected="selected"' : '' ?>><?php _e('Col-reverse', 'LayerSlider') ?></option>
  618. <option value="random"<?php echo ($tr['tile']['sequence'] == 'random') ? ' selected="selected"' : '' ?>><?php _e('Random', 'LayerSlider') ?></option>
  619. </select>
  620. </td>
  621. </tr>
  622. <tr>
  623. <td></td>
  624. <td></td>
  625. <td class="right"><?php _e('Depth', 'LayerSlider') ?></td>
  626. <td>
  627. <label data-help="<?php _e('The script will try to identify the optimal depth for your rotated objects (tiles). With this option, you can force your objects to have large depth when performing 180 degree (and its multiplies) rotation.', 'LayerSlider') ?>">
  628. <input type="checkbox" class="checkbox" name="depth" value="large"<?php echo isset($tr['tile']['depth']) ? ' checked="checked"' : '' ?>>
  629. Large depth
  630. </label>
  631. </td>
  632. </tr>
  633. </tbody>
  634. <?php
  635. $checkboxProp = isset($tr['before']['enabled']) ? ' checked="checked"' : '';
  636. $collapseClass = !isset($tr['before']['enabled']) ? ' ls-builder-collapsed' : '';
  637. ?>
  638. <thead>
  639. <tr>
  640. <td colspan="4">
  641. <span><?php _e('Before animation', 'LayerSlider') ?></span>
  642. <p class="ls-builder-checkbox">
  643. <label><input type="checkbox"<?php echo $checkboxProp ?> class="ls-builder-collapse-toggle"> Enabled</label>
  644. </p>
  645. </td>
  646. </tr>
  647. </thead>
  648. <tbody class="before<?php echo $collapseClass ?>">
  649. <tr>
  650. <td class="right"><?php _e('Duration', 'LayerSlider') ?></td>
  651. <td><input type="text" name="duration" value="<?php echo isset($tr['before']['duration']) ? $tr['before']['duration'] : '1000' ?>" data-help="<?php _e('The duration of your animation. This value is in millisecs, so the value 1000 means 1 second.', 'LayerSlider') ?>"></td>
  652. <td class="right"><a href="http://easings.net/" target="_blank"><?php _e('Easing', 'LayerSlider') ?></a></td>
  653. <td>
  654. <?php $tr['before']['easing'] = isset($tr['before']['easing']) ? $tr['before']['easing'] : 'easeInOutBack' ?>
  655. <select name="easing" data-help="<?php _e('The timing function of the animation, with it you can manipualte the movement of the animated object. Please click on the link next to this select field to open easings.net for more information and real-time examples.', 'LayerSlider') ?>">
  656. <option<?php echo ($tr['before']['easing'] == 'linear') ? ' selected="selected"' : '' ?>>linear</option>
  657. <option<?php echo ($tr['before']['easing'] == 'easeInQuad') ? ' selected="selected"' : '' ?>>easeInQuad</option>
  658. <option<?php echo ($tr['before']['easing'] == 'easeOutQuad') ? ' selected="selected"' : '' ?>>easeOutQuad</option>
  659. <option<?php echo ($tr['before']['easing'] == 'easeInOutQuad') ? ' selected="selected"' : '' ?>>easeInOutQuad</option>
  660. <option<?php echo ($tr['before']['easing'] == 'easeInCubic') ? ' selected="selected"' : '' ?>>easeInCubic</option>
  661. <option<?php echo ($tr['before']['easing'] == 'easeOutCubic') ? ' selected="selected"' : '' ?>>easeOutCubic</option>
  662. <option<?php echo ($tr['before']['easing'] == 'easeInOutCubic') ? ' selected="selected"' : '' ?>>easeInOutCubic</option>
  663. <option<?php echo ($tr['before']['easing'] == 'easeInQuart') ? ' selected="selected"' : '' ?>>easeInQuart</option>
  664. <option<?php echo ($tr['before']['easing'] == 'easeOutQuart') ? ' selected="selected"' : '' ?>>easeOutQuart</option>
  665. <option<?php echo ($tr['before']['easing'] == 'easeInOutQuart') ? ' selected="selected"' : '' ?>>easeInOutQuart</option>
  666. <option<?php echo ($tr['before']['easing'] == 'easeInQuint') ? ' selected="selected"' : '' ?>>easeInQuint</option>
  667. <option<?php echo ($tr['before']['easing'] == 'easeOutQuint') ? ' selected="selected"' : '' ?>>easeOutQuint</option>
  668. <option<?php echo ($tr['before']['easing'] == 'easeInOutQuint') ? ' selected="selected"' : '' ?>>easeInOutQuint</option>
  669. <option<?php echo ($tr['before']['easing'] == 'easeInSine') ? ' selected="selected"' : '' ?>>easeInSine</option>
  670. <option<?php echo ($tr['before']['easing'] == 'easeOutSine') ? ' selected="selected"' : '' ?>>easeOutSine</option>
  671. <option<?php echo ($tr['before']['easing'] == 'easeInOutSine') ? ' selected="selected"' : '' ?>>easeInOutSine</option>
  672. <option<?php echo ($tr['before']['easing'] == 'easeInExpo') ? ' selected="selected"' : '' ?>>easeInExpo</option>
  673. <option<?php echo ($tr['before']['easing'] == 'easeOutExpo') ? ' selected="selected"' : '' ?>>easeOutExpo</option>
  674. <option<?php echo ($tr['before']['easing'] == 'easeInOutExpo') ? ' selected="selected"' : '' ?>>easeInOutExpo</option>
  675. <option<?php echo ($tr['before']['easing'] == 'easeInCirc') ? ' selected="selected"' : '' ?>>easeInCirc</option>
  676. <option<?php echo ($tr['before']['easing'] == 'easeOutCirc') ? ' selected="selected"' : '' ?>>easeOutCirc</option>
  677. <option<?php echo ($tr['before']['easing'] == 'easeInOutCirc') ? ' selected="selected"' : '' ?>>easeInOutCirc</option>
  678. <option<?php echo ($tr['before']['easing'] == 'easeInBack') ? ' selected="selected"' : '' ?>>easeInBack</option>
  679. <option<?php echo ($tr['before']['easing'] == 'easeOutBack') ? ' selected="selected"' : '' ?>>easeOutBack</option>
  680. <option<?php echo ($tr['before']['easing'] == 'easeInOutBack') ? ' selected="selected"' : '' ?>>easeInOutBack</option>
  681. </select>
  682. </td>
  683. </tr>
  684. <tr class="transition">
  685. <td colspan="4">
  686. <ul class="ls-tr-tags">
  687. <?php if(isset($tr['before']['transition']) && !empty($tr['before']['transition'])) : ?>
  688. <?php foreach($tr['before']['transition'] as $pkey => $prop) : ?>
  689. <li>
  690. <p>
  691. <span><?php echo lsTrGetProperty($pkey) ?></span>
  692. <input type="text" name="<?php echo $pkey ?>" value="<?php echo $prop ?>">
  693. </p>
  694. <a href="#">x</a>
  695. </li>
  696. <?php endforeach; ?>
  697. <?php endif; ?>
  698. </ul>
  699. <p class="ls-tr-add-property">
  700. <a href="#" class="ls-icon-tr-add"><?php _e('Add new', 'LayerSlider') ?></a>
  701. <select>
  702. <option value="scale3d,0.8"><?php _e('Scale3D', 'LayerSlider') ?></option>
  703. <option value="rotateX,90"><?php _e('RotateX', 'LayerSlider') ?></option>
  704. <option value="rotateY,90"><?php _e('RotateY', 'LayerSlider') ?></option>
  705. <option value="delay,200"><?php _e('Delay', 'LayerSlider') ?></option>
  706. </select>
  707. </p>
  708. </td>
  709. </tr>
  710. </tbody>
  711. <thead>
  712. <tr>
  713. <td colspan="4">
  714. <?php _e('Animation', 'LayerSlider') ?>
  715. </td>
  716. </tr>
  717. </thead>
  718. <tbody class="animation">
  719. <tr>
  720. <td class="right"><?php _e('Duration', 'LayerSlider') ?></td>
  721. <td><input type="text" name="duration" value="<?php echo $tr['animation']['duration'] ?>" data-help="<?php _e('The duration of your animation. This value is in millisecs, so the value 1000 means 1 second.', 'LayerSlider') ?>"></td>
  722. <td class="right"><a href="http://easings.net/" target="_blank"><?php _e('Easing', 'LayerSlider') ?></a></td>
  723. <td>
  724. <select name="easing" data-help="<?php _e('The timing function of the animation, with it you can manipualte the movement of the animated object. Please click on the link next to this select field to open easings.net for more information and real-time examples.', 'LayerSlider') ?>">
  725. <option<?php echo ($tr['animation']['easing'] == 'linear') ? ' selected="selected"' : '' ?>>linear</option>
  726. <option<?php echo ($tr['animation']['easing'] == 'easeInQuad') ? ' selected="selected"' : '' ?>>easeInQuad</option>
  727. <option<?php echo ($tr['animation']['easing'] == 'easeOutQuad') ? ' selected="selected"' : '' ?>>easeOutQuad</option>
  728. <option<?php echo ($tr['animation']['easing'] == 'easeInOutQuad') ? ' selected="selected"' : '' ?>>easeInOutQuad</option>
  729. <option<?php echo ($tr['animation']['easing'] == 'easeInCubic') ? ' selected="selected"' : '' ?>>easeInCubic</option>
  730. <option<?php echo ($tr['animation']['easing'] == 'easeOutCubic') ? ' selected="selected"' : '' ?>>easeOutCubic</option>
  731. <option<?php echo ($tr['animation']['easing'] == 'easeInOutCubic') ? ' selected="selected"' : '' ?>>easeInOutCubic</option>
  732. <option<?php echo ($tr['animation']['easing'] == 'easeInQuart') ? ' selected="selected"' : '' ?>>easeInQuart</option>
  733. <option<?php echo ($tr['animation']['easing'] == 'easeOutQuart') ? ' selected="selected"' : '' ?>>easeOutQuart</option>
  734. <option<?php echo ($tr['animation']['easing'] == 'easeInOutQuart') ? ' selected="selected"' : '' ?>>easeInOutQuart</option>
  735. <option<?php echo ($tr['animation']['easing'] == 'easeInQuint') ? ' selected="selected"' : '' ?>>easeInQuint</option>
  736. <option<?php echo ($tr['animation']['easing'] == 'easeOutQuint') ? ' selected="selected"' : '' ?>>easeOutQuint</option>
  737. <option<?php echo ($tr['animation']['easing'] == 'easeInOutQuint') ? ' selected="selected"' : '' ?>>easeInOutQuint</option>
  738. <option<?php echo ($tr['animation']['easing'] == 'easeInSine') ? ' selected="selected"' : '' ?>>easeInSine</option>
  739. <option<?php echo ($tr['animation']['easing'] == 'easeOutSine') ? ' selected="selected"' : '' ?>>easeOutSine</option>
  740. <option<?php echo ($tr['animation']['easing'] == 'easeInOutSine') ? ' selected="selected"' : '' ?>>easeInOutSine</option>
  741. <option<?php echo ($tr['animation']['easing'] == 'easeInExpo') ? ' selected="selected"' : '' ?>>easeInExpo</option>
  742. <option<?php echo ($tr['animation']['easing'] == 'easeOutExpo') ? ' selected="selected"' : '' ?>>easeOutExpo</option>
  743. <option<?php echo ($tr['animation']['easing'] == 'easeInOutExpo') ? ' selected="selected"' : '' ?>>easeInOutExpo</option>
  744. <option<?php echo ($tr['animation']['easing'] == 'easeInCirc') ? ' selected="selected"' : '' ?>>easeInCirc</option>
  745. <option<?php echo ($tr['animation']['easing'] == 'easeOutCirc') ? ' selected="selected"' : '' ?>>easeOutCirc</option>
  746. <option<?php echo ($tr['animation']['easing'] == 'easeInOutCirc') ? ' selected="selected"' : '' ?>>easeInOutCirc</option>
  747. <option<?php echo ($tr['animation']['easing'] == 'easeInBack') ? ' selected="selected"' : '' ?>>easeInBack</option>
  748. <option<?php echo ($tr['animation']['easing'] == 'easeOutBack') ? ' selected="selected"' : '' ?>>easeOutBack</option>
  749. <option<?php echo ($tr['animation']['easing'] == 'easeInOutBack') ? ' selected="selected"' : '' ?>>easeInOutBack</option>
  750. </select>
  751. </td>
  752. </tr>
  753. <tr>
  754. <td></td>
  755. <td></td>
  756. <td class="right"><?php _e('Direction', 'LayerSlider') ?></td>
  757. <td>
  758. <select name="direction" data-help="<?php _e('The direction of rotation.', 'LayerSlider') ?>">
  759. <option value="vertical"<?php echo ($tr['animation']['direction'] == 'vertical') ? ' selected="selected"' : '' ?>><?php _e('Vertical', 'LayerSlider'); ?></option>
  760. <option value="horizontal"<?php echo ($tr['animation']['direction'] == 'horizontal') ? ' selected="selected"' : '' ?>><?php _e('Horizontal', 'LayerSlider') ?></option>
  761. </select>
  762. </td>
  763. </tr>
  764. <tr class="transition">
  765. <td colspan="4">
  766. <ul class="ls-tr-tags">
  767. <?php if(isset($tr['animation']['transition']) && !empty($tr['animation']['transition'])) : ?>
  768. <?php foreach($tr['animation']['transition'] as $pkey => $prop) : ?>
  769. <li>
  770. <p>
  771. <span><?php echo lsTrGetProperty($pkey) ?></span>
  772. <input type="text" name="<?php echo $pkey ?>" value="<?php echo $prop ?>">
  773. </p>
  774. <a href="#">x</a>
  775. </li>
  776. <?php endforeach; ?>
  777. <?php endif; ?>
  778. </ul>
  779. <p class="ls-tr-add-property">
  780. <a href="#" class="ls-icon-tr-add"><?php _e('Add new', 'LayerSlider') ?></a>
  781. <select>
  782. <option value="scale3d,0.8"><?php _e('Scale3D', 'LayerSlider') ?></option>
  783. <option value="rotateX,90"><?php _e('RotateX', 'LayerSlider') ?></option>
  784. <option value="rotateY,90"><?php _e('RotateY', 'LayerSlider') ?></option>
  785. <option value="delay,200"><?php _e('Delay', 'LayerSlider') ?></option>
  786. </select>
  787. </p>
  788. </td>
  789. </tr>
  790. </tbody>
  791. <?php
  792. $checkboxProp = isset($tr['after']['enabled']) ? ' checked="checked"' : '';
  793. $collapseClass = !isset($tr['after']['enabled']) ? ' ls-builder-collapsed' : '';
  794. ?>
  795. <thead>
  796. <tr>
  797. <td colspan="4">
  798. <?php _e('After animation', 'LayerSlider') ?>
  799. <p class="ls-builder-checkbox">
  800. <label><input type="checkbox"<?php echo $checkboxProp ?> class="ls-builder-collapse-toggle"> Enabled</label>
  801. </p>
  802. </td>
  803. </tr>
  804. </thead>
  805. <tbody class="after<?php echo $collapseClass ?>">
  806. <tr>
  807. <td class="right"><?php _e('Duration', 'LayerSlider') ?></td>
  808. <td><input type="text" name="duration" value="<?php echo isset($tr['after']['duration']) ? $tr['after']['duration'] : '1000' ?>" data-help="<?php _e('The duration of your animation. This value is in millisecs, so the value 1000 means 1 second.', 'LayerSlider') ?>"></td>
  809. <td class="right"><a href="http://easings.net/" target="_blank"><?php _e('Easing', 'LayerSlider') ?></a></td>
  810. <td>
  811. <?php $tr['after']['easing'] = isset($tr['after']['easing']) ? $tr['after']['easing'] : 'easeInOutBack' ?>
  812. <select name="easing" data-help="<?php _e('The timing function of the animation, with it you can manipualte the movement of the animated object. Please click on the link next to this select field to open easings.net for more information and real-time examples.', 'LayerSlider') ?>">
  813. <option<?php echo ($tr['after']['easing'] == 'linear') ? ' selected="selected"' : '' ?>>linear</option>
  814. <option<?php echo ($tr['after']['easing'] == 'easeInQuad') ? ' selected="selected"' : '' ?>>easeInQuad</option>
  815. <option<?php echo ($tr['after']['easing'] == 'easeOutQuad') ? ' selected="selected"' : '' ?>>easeOutQuad</option>
  816. <option<?php echo ($tr['after']['easing'] == 'easeInOutQuad') ? ' selected="selected"' : '' ?>>easeInOutQuad</option>
  817. <option<?php echo ($tr['after']['easing'] == 'easeInCubic') ? ' selected="selected"' : '' ?>>easeInCubic</option>
  818. <option<?php echo ($tr['after']['easing'] == 'easeOutCubic') ? ' selected="selected"' : '' ?>>easeOutCubic</option>
  819. <option<?php echo ($tr['after']['easing'] == 'easeInOutCubic') ? ' selected="selected"' : '' ?>>easeInOutCubic</option>
  820. <option<?php echo ($tr['after']['easing'] == 'easeInQuart') ? ' selected="selected"' : '' ?>>easeInQuart</option>
  821. <option<?php echo ($tr['after']['easing'] == 'easeOutQuart') ? ' selected="selected"' : '' ?>>easeOutQuart</option>
  822. <option<?php echo ($tr['after']['easing'] == 'easeInOutQuart') ? ' selected="selected"' : '' ?>>easeInOutQuart</option>
  823. <option<?php echo ($tr['after']['easing'] == 'easeInQuint') ? ' selected="selected"' : '' ?>>easeInQuint</option>
  824. <option<?php echo ($tr['after']['easing'] == 'easeOutQuint') ? ' selected="selected"' : '' ?>>easeOutQuint</option>
  825. <option<?php echo ($tr['after']['easing'] == 'easeInOutQuint') ? ' selected="selected"' : '' ?>>easeInOutQuint</option>
  826. <option<?php echo ($tr['after']['easing'] == 'easeInSine') ? ' selected="selected"' : '' ?>>easeInSine</option>
  827. <option<?php echo ($tr['after']['easing'] == 'easeOutSine') ? ' selected="selected"' : '' ?>>easeOutSine</option>
  828. <option<?php echo ($tr['after']['easing'] == 'easeInOutSine') ? ' selected="selected"' : '' ?>>easeInOutSine</option>
  829. <option<?php echo ($tr['after']['easing'] == 'easeInExpo') ? ' selected="selected"' : '' ?>>easeInExpo</option>
  830. <option<?php echo ($tr['after']['easing'] == 'easeOutExpo') ? ' selected="selected"' : '' ?>>easeOutExpo</option>
  831. <option<?php echo ($tr['after']['easing'] == 'easeInOutExpo') ? ' selected="selected"' : '' ?>>easeInOutExpo</option>
  832. <option<?php echo ($tr['after']['easing'] == 'easeInCirc') ? ' selected="selected"' : '' ?>>easeInCirc</option>
  833. <option<?php echo ($tr['after']['easing'] == 'easeOutCirc') ? ' selected="selected"' : '' ?>>easeOutCirc</option>
  834. <option<?php echo ($tr['after']['easing'] == 'easeInOutCirc') ? ' selected="selected"' : '' ?>>easeInOutCirc</option>
  835. <option<?php echo ($tr['after']['easing'] == 'easeInBack') ? ' selected="selected"' : '' ?>>easeInBack</option>
  836. <option<?php echo ($tr['after']['easing'] == 'easeOutBack') ? ' selected="selected"' : '' ?>>easeOutBack</option>
  837. <option<?php echo ($tr['after']['easing'] == 'easeInOutBack') ? ' selected="selected"' : '' ?>>easeInOutBack</option>
  838. </select>
  839. </td>
  840. </tr>
  841. <tr class="transition">
  842. <td colspan="4">
  843. <ul class="ls-tr-tags">
  844. <?php if(isset($tr['after']['transition']) && !empty($tr['after']['transition'])) : ?>
  845. <?php foreach($tr['after']['transition'] as $pkey => $prop) : ?>
  846. <li>
  847. <p>
  848. <span><?php echo lsTrGetProperty($pkey) ?></span>
  849. <input type="text" name="<?php echo $pkey ?>" value="<?php echo $prop ?>">
  850. </p>
  851. <a href="#">x</a>
  852. </li>
  853. <?php endforeach; ?>
  854. <?php endif; ?>
  855. </ul>
  856. <p class="ls-tr-add-property">
  857. <a href="#" class="ls-icon-tr-add"><?php _e('Add new', 'LayerSlider') ?></a>
  858. <select>
  859. <option value="scale3d,0.8"><?php _e('Scale3D', 'LayerSlider') ?></option>
  860. <option value="rotateX,90"><?php _e('RotateX', 'LayerSlider') ?></option>
  861. <option value="rotateY,90"><?php _e('RotateY', 'LayerSlider') ?></option>
  862. <option value="delay,200"><?php _e('Delay', 'LayerSlider') ?></option>
  863. </select>
  864. </p>
  865. </td>
  866. </tr>
  867. </tbody>
  868. <thead>
  869. <tr>
  870. <td colspan="4"><?php _e('Transition options', 'LayerSlider') ?></td>
  871. </tr>
  872. </thead>
  873. <tbody>
  874. <tr>
  875. <td colspan="4">
  876. <button class="button-primary ls-tr-remove right"><?php _e('Remove transition', 'LayerSlider') ?></button>
  877. </td>
  878. </tr>
  879. </tbody>
  880. </table>
  881. </div>
  882. <?php endforeach; ?>
  883. <?php else : ?>
  884. <div class="ls-no-transitions-notification">
  885. <h1>You didn't create any 3D transitions yet</h1>
  886. <p>To create a new transition, click to the "Add new" button above this text.</p>
  887. </div>
  888. <?php endif; ?>
  889. </div>
  890. <div class="ls-builder-right ls-tr-list-2d">
  891. <?php if(isset($data['t2d']) && !empty($data['t2d'])) : ?>
  892. <?php foreach($data['t2d'] as $key => $tr) : ?>
  893. <?php $activeClass = ($key == 0) ? ' active' : '' ?>
  894. <div class="ls-transition-item<?php echo $activeClass ?>">
  895. <table class="ls-box ls-tr-settings bottomborder">
  896. <thead>
  897. <tr>
  898. <td colspan="4"><?php _e('Preview', 'LayerSlider') ?></td>
  899. </tr>
  900. </thead>
  901. <tbody>
  902. <tr>
  903. <td colspan="4">
  904. <div class="ls-builder-preview ls-transition-preview">
  905. <img src="<?php echo $GLOBALS['lsPluginPath'] ?>img/sample_slide_1.png" alt="preview image">
  906. </div>
  907. <div class="ls-builder-preview-button">
  908. <button class="button">Enter Preview</button>
  909. </div>
  910. </td>
  911. </tr>
  912. </tbody>
  913. <thead>
  914. <tr>
  915. <td colspan="4"><?php _e('Basic properties', 'LayerSlider') ?></td>
  916. </tr>
  917. </thead>
  918. <tbody class="basic">
  919. <tr>
  920. <td class="right"><?php _e('Transition name', 'LayerSlider') ?></td>
  921. <td colspan="3"><input type="text" name="name" value="<?php echo $tr['name'] ?>" data-help="<?php _e('The name of your custom transition. When you will edit a slider, it will appear with this name, so you can easily identify the individual transitions.', 'LayerSlider') ?>"></td>
  922. </tr>
  923. <tr>
  924. <?php $tr['rows'] = is_array($tr['rows']) ? implode(',', $tr['rows']) : $tr['rows']; ?>
  925. <?php $tr['cols'] = is_array($tr['cols']) ? implode(',', $tr['cols']) : $tr['cols']; ?>
  926. <td class="right"><?php _e('Rows', 'LayerSlider') ?></td>
  927. <td><input type="text" name="rows" value="<?php echo $tr['rows'] ?>" data-help="<?php _e('<number> or <min_number>,<max_number> If you specify a value greater than 1, LayerSlider will cut your slide into tiles. You can specify here how many rows of your transition should have. If you specify two numbers separated with a comma, LayerSlider will use that as a range and pick a random number between your values.', 'LayerSlider') ?>"></td>
  928. <td class="right"><?php _e('Cols', 'LayerSlider') ?></td>
  929. <

Large files files are truncated, but you can click here to view the full file