Skip to content

Commit a90d302

Browse files
committed
Added new template, added Copy text without tags feature + updated jComponent library
1 parent 318adea commit a90d302

File tree

4 files changed

+41
-4
lines changed

4 files changed

+41
-4
lines changed

code.bundle

Lines changed: 3 additions & 2 deletions
Large diffs are not rendered by default.

public/js/cdn.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/parts/code.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,9 @@
630630
items.push({ name: '@(Copy with syntax)', icon: 'print', value: 'copysyntax' });
631631
items.push({ name: '@(Copy as Markdown)', icon: '!fab fa-markdown', value: 'copymarkdown' });
632632

633+
if (text.indexOf('<') !== -1)
634+
items.push({ name: '@(Copy without tags)', icon: '!far fa-copy', value: 'copytext' });
635+
633636
if (text.indexOf('.define(\'') !== -1)
634637
items.push({ name: '@(Copy as JSON)', icon: '!fa fa-code', value: 'copyasjson' });
635638

@@ -788,9 +791,10 @@
788791
sub.push({ name: '@(HTML template)', icon: 'code', value: 'template', id: 'html' });
789792
sub.push({ name: '@(Mail template)', icon: 'code', value: 'template', id: 'email' });
790793
sub.push({ name: '@(Plugin)', icon: 'code', value: 'template', id: 'plugin' });
794+
sub.push({ name: '@(j-MiniForm)', icon: 'code', value: 'template', id: 'miniform' });
791795
sub.push({ name: '@(j-Form)', icon: 'code', value: 'template', id: 'form' });
792796
sub.push({ name: '@(j-LargeForm)', icon: 'code', value: 'template', id: 'largeform' });
793-
sub.push({ name: '@(j-MiniForm)', icon: 'code', value: 'template', id: 'miniform' });
797+
sub.push({ name: '@(j-FullForm)', icon: 'code', value: 'template', id: 'fullform' });
794798
sub.push({ name: '@(j-Modal)', icon: 'code', value: 'template', id: 'modal' });
795799
sub.push({ name: '@(j-Panel)', icon: 'code', value: 'template', id: 'panel' });
796800
sub.push({ name: '@(j-Window)', icon: 'code', value: 'template', id: 'window' });
@@ -877,6 +881,11 @@
877881
return;
878882
}
879883

884+
if (value.value === 'copytext') {
885+
SETTER('clipboard/copy', text.removeTags());
886+
return;
887+
}
888+
880889
if (value.value === 'copysyntax') {
881890
var div = document.createElement('DIV');
882891
var el = document.createElement('PRE');

public/templates/fullform.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<div data---="fullform__common.form__if:NAME;icon:hashtag;autofocus:true;reload:?/reload;scrollbar:1;submit:?/submit;width:800" class="hidden" data-scope="NAME">
2+
<div class="padding">
3+
YOUR CODE
4+
</div>
5+
<nav data---="validation__?">
6+
<button name="submit" disabled><i class="fa fa-check-circle"></i>@(SUBMIT)</button>
7+
<button name="cancel">@(Cancel)</button>
8+
</nav>
9+
</div>
10+
11+
<script>
12+
13+
PLUGIN('NAME', function(exports) {
14+
15+
exports.reload = function(com) {
16+
var model = GET('?');
17+
var id = model ? model.id : null;
18+
com.reconfigure({ title: id ? '@(Update)' : '@(Create)' });
19+
};
20+
21+
exports.submit = function(hide) {
22+
hide();
23+
};
24+
25+
});
26+
27+
</script>

0 commit comments

Comments
 (0)