updater
9 years ago
vendor
9 years ago
admin-posts.php
9 years ago
admin-settings-cache.php
9 years ago
admin-settings-editing.php
9 years ago
admin-settings-js-config.php
9 years ago
admin-settings-modules.php
9 years ago
admin-settings-post-types.php
9 years ago
admin-settings-uninstall.php
9 years ago
admin-settings-upgrade.php
9 years ago
admin-settings-welcome.php
9 years ago
admin-settings.php
9 years ago
column-css.php
9 years ago
column-group.php
9 years ago
column-settings.php
9 years ago
column.php
9 years ago
compatibility.php
9 years ago
export-filters.php
9 years ago
export.php
9 years ago
field-button.php
9 years ago
field-code.php
9 years ago
field-color.php
9 years ago
field-editor.php
9 years ago
field-font.php
9 years ago
field-form.php
9 years ago
field-icon.php
9 years ago
field-layout.php
9 years ago
field-link.php
9 years ago
field-multiple-audios.php
9 years ago
field-multiple-photos.php
9 years ago
field-photo-sizes.php
9 years ago
field-photo.php
9 years ago
field-post-type.php
9 years ago
field-select.php
9 years ago
field-suggest.php
9 years ago
field-text.php
9 years ago
field-textarea.php
9 years ago
field-time.php
9 years ago
field-timezone.php
9 years ago
field-video.php
9 years ago
field.php
9 years ago
global-settings.php
9 years ago
icon-selector.php
9 years ago
jquery.php
9 years ago
layout-js-config.php
9 years ago
layout-settings.php
9 years ago
loop-settings.php
9 years ago
module-settings.php
9 years ago
module.php
9 years ago
row-css.php
9 years ago
row-js.php
9 years ago
row-settings.php
9 years ago
row-video.php
9 years ago
row.php
9 years ago
service-settings.php
9 years ago
settings.php
9 years ago
strings.php
9 years ago
template-selector.php
9 years ago
ui-bar.php
9 years ago
ui-fields.php
9 years ago
ui-js-config.php
9 years ago
ui-js-templates.php
9 years ago
ui-panel-module-templates.php
9 years ago
ui-panel-row-templates.php
9 years ago
ui-panel.php
9 years ago
updater-config.php
9 years ago
field-code.php
36 lines
| 1 | <div class="fl-code-field"> |
| 2 | <?php $editor_id = 'flcode' . time() . '_' . $name; ?> |
| 3 | <textarea id="<?php echo $editor_id; ?>" name="<?php echo $name; ?>" data-editor="<?php echo $field['editor']; ?>" <?php if(isset($field['class'])) echo ' class="'. $field['class'] .'"'; if(isset($field['rows'])) echo ' rows="'. $field['rows'] .'"'; ?>><?php echo htmlspecialchars($value); ?></textarea> |
| 4 | <script> |
| 5 | |
| 6 | jQuery(function(){ |
| 7 | |
| 8 | var textarea = jQuery('#<?php echo $editor_id; ?>'), |
| 9 | mode = textarea.data('editor'), |
| 10 | editDiv = jQuery('<div>', { |
| 11 | position: 'absolute', |
| 12 | height: parseInt(textarea.attr('rows'), 10) * 20 |
| 13 | }), |
| 14 | editor = null; |
| 15 | |
| 16 | editDiv.insertBefore(textarea); |
| 17 | textarea.css('display', 'none'); |
| 18 | ace.require('ace/ext/language_tools'); |
| 19 | editor = ace.edit(editDiv[0]); |
| 20 | editor.$blockScrolling = Infinity; |
| 21 | editor.getSession().setValue(textarea.val()); |
| 22 | editor.getSession().setMode('ace/mode/' + mode); |
| 23 | |
| 24 | editor.setOptions({ |
| 25 | enableBasicAutocompletion: true, |
| 26 | enableLiveAutocompletion: true, |
| 27 | enableSnippets: false |
| 28 | }); |
| 29 | |
| 30 | editor.getSession().on('change', function(e) { |
| 31 | textarea.val(editor.getSession().getValue()).trigger('change'); |
| 32 | }); |
| 33 | }); |
| 34 | |
| 35 | </script> |
| 36 | </div> |