card-mod-tinymce_editor 0.15.4 → 0.15.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 36d9a668bf86adccd95c7b46bdd568df695d72b5643665bcf8893b58f5389813
4
- data.tar.gz: 1f77fd85fe809ef7a21021c0907742d7183214ee0f004e559aa2b01b7f48a89f
3
+ metadata.gz: db002d89dffcadd201260f568b948ce16cc1640ed427ca45e9bb195be0249844
4
+ data.tar.gz: 3a328298b8b9af6cd81b04ee87f35f8daa54be4e0cbe7d9d83eb7f78c8786526
5
5
  SHA512:
6
- metadata.gz: 11b4353ae0d81a9efcae64443d0f22e6754b80f71164390b419dc7c48fffb7111ad9e632608ebf1b15c57c90dbfff98cc63e62762e2e7d7bc9d85504ecd619fa
7
- data.tar.gz: 288695a20ff2625e4a039f6b2276af8748b86648e7af615e2d7c67d9047eb7a198ece5e9335868903ad49804570b78c95bf3143df12026a48f9af6672d3cb552
6
+ metadata.gz: fa393ccb2c99e55d63a18edfeec894d59e257dde369ef475cc9c60d7ea9658eefc144d957895b995c983a2463ab1e3afcb582ee5a9a14137029180f76d76c5e4
7
+ data.tar.gz: 325651eb24c03952f48ec14356db8332ecd1973f0a44aa690ffb90cb263f73d38729c30fa1fb4a05d9efb958eec59f9f69e7214af8e28214e177eb39dfb63a20
@@ -65,7 +65,7 @@ $.extend nest,
65
65
 
66
66
 
67
67
  request: (card, overlay_view, modal_view, slotter, params) ->
68
- slot = $(".bridge-sidebar > ._overlay-container-placeholder > .card-slot")
68
+ slot = $(".board-sidebar > ._overlay-container-placeholder > .card-slot")
69
69
 
70
70
  if false #slot[0]
71
71
  view = overlay_view
@@ -3,7 +3,7 @@
3
3
  // link_editor.js.coffee
4
4
  (function(){$(document).ready(function(){return $("body").on("click","button._link-apply",function(){return link.applyLink($(this).data("tinymce-id"),$(this).data("tm-snippet-start"),$(this).data("tm-snippet-size"))})}),window.link||(window.link={}),$(document).ready(function(){return $("body").on("click","._link-field-toggle",function(){return $(this).is(":checked")?link.addPlus():link.removePlus()}),$("body").on("input","input._link-target",function(){return link.targetChanged()}),$("body").on("input","input._link-title",function(){return link.titleChanged()})}),$.extend(link,{openLinkEditor:function(n){var i;return null==i&&(i=nest.editParams(n,"[[","]]")),nest.openEditorForTm(n,i,"link_editor","modal_link_editor")},applyLink:function(n,i,e){return nest.applySnippet("link",n,i,e)},target:function(){return link.evalFieldOption($("input._link-target").val())},title:function(){return $("input._link-title").val()},titleChanged:function(){var n;return n=$("._link-preview").val().replace(/^\[\[[^\]]*/,"[["+link.target()+"|"+link.title()),link.updatePreview(n)},targetChanged:function(){var n;return n=$("._link-preview").val().replace(/^\[\[[^\]|]*/,"[["+link.target()),link.updatePreview(n)},evalFieldOption:function(n){return link.isField()?"+"+n:n},isField:function(){return $("._link-field-toggle").is(":checked")},addPlus:function(){var n;return n=$("._link-preview").val().replace(/^\[\[\+?/,"[[+"),link.updatePreview(n),$(".input-group.hide-prefix").removeClass("hide-prefix").addClass("show-prefix")},removePlus:function(){var n;return n=$("._link-preview").val().replace(/^\[\[\+?/,"[["),link.updatePreview(n),$(".input-group.show-prefix").removeClass("show-prefix").addClass("hide-prefix")},updatePreview:function(n){return null==n&&(n="[["+link.target()+"|"+link.title()+"]]"),$("._link-preview").val(n)}})}).call(this);
5
5
  // nest_editor.js.coffee
6
- (function(){$(document).ready(function(){return $("body").on("click","button._nest-apply",function(){return null!=$(this).data("index")?nest.applyNestToNestListEditor($(this).data("index")):nest.applyNestToTinymceEditor($(this).data("tinymce-id"),$(this).data("tm-snippet-start"),$(this).data("tm-snippet-size"))}),$("body").on("click","button._image_nest-apply",function(){return nest.applyNestToTinymceEditor($(this).data("tinymce-id"),$(this).data("tm-snippet-start"),$(this).data("tm-snippet-size"))}),$("body").on("click","button._change-create-to-update",function(){var t;return t=$(this).closest("form").find("#success_tinymce_id").val(),nest.changeCreateToUpdate(t)}),$("body").on("click","button._open-nest-editor",function(){var t,e,n,r;return r=(e=$(this).closest("._nest-form")).find("._reference").val(),n=e.find("._nest-options").val(),t=encodeURIComponent("{{"+r+"|"+n+"}}"),nest.openNestEditorForSlot($(this).closest(".card-slot"),$(this).closest(".slotter"),"index="+e.data("index")+"&tm_snippet_raw="+t)})}),window.nest||(window.nest={}),$.extend(nest,{openNestEditor:function(t,e){return null==e&&(e=nest.editParams(t)),this.openEditorForTm(t,e,"nest_editor","modal_nest_editor")},openNestEditorForSlot:function(t,e,n){var r;return r=t[0]?$(t[0]).attr("data-card-name"):":update",nest.request(r,"nest_editor","modal_nest_editor",e,n)},openEditorForTm:function(t,e,n,r){var a,s,o,i;return e+="&tinymce_id="+t.id,o=$("#"+t.id).closest(".card-slot"),s=$("#"+t.id).closest(".card-editor"),i=$("#"+t.id),0===(a=s[0]&&$(s[0]).attr("card_name")||o[0]&&$(o[0]).attr("data-card-name")||":update").length&&(a=":update"),nest.request(a,n,r,i,e)},openImageEditor:function(t){var e;return null==e&&(e=nest.editParams(t,"{{","}}",!1)),this.openEditorForTm(t,e,"nest_image","modal_nest_image")},changeCreateToUpdate:function(t){var e,n;return n=(e=$("#"+t).closest("form")).attr("action").replace("card/create","card/update"),e.attr("action",n)},insertNest:function(t,e){return t.insertContent(e)},request:function(t,e,n,r,a){var s,o,i;return o=$(".bridge-sidebar > ._overlay-container-placeholder > .card-slot"),o=$($(".card-slot")[0]),i=n,s="modal",nest.sendRequest(r,o,s,t,i,a)},sendRequest:function(t,e,n,r,a,s){var o;return null==s&&(s=""),o="/"+r+"?view="+a+"&"+s,$.ajax({url:o,success:function(r){return e.slotContent(r,n,t)}})},editParams:function(t,e,n,r){var a,s,o,i,d,l,c,p,u;return null==e&&(e="{{"),null==n&&(n="}}"),null==r&&(r=!0),null==(p=t.selection.getSel())||null==p.anchorNode?nest.paramsStr(0):(u=p.anchorNode.data)?(c=p.anchorOffset,s=u.substr(0,c),a=u.substr(c),(o={before:{close:s.lastIndexOf(n),open:s.lastIndexOf(e)},after:{close:a.indexOf(n),open:a.indexOf(e)}}).before.open>o.before.close&&-1!==o.after.close&&(-1===o.after.open||o.after.close<o.after.open)?(l=o.before.open,null==i&&(d=o.after.close+c+2-l,i=u.substr(l,d)),r?nest.paramsStr(l,i):nest.paramsStr(l+d)):nest.paramsStr(c)):nest.paramsStr(p.anchorOffset)},paramsStr:function(t,e){var n;return n="",null!=t&&(n+="&tm_snippet_start="+t),null!=e&&e.length>0&&(n+="&tm_snippet_raw="+encodeURIComponent(e)),n},offsetAfterInsert:function(t,e){return t.selection.getSel().anchorOffset-e.lengthr},applyNestToTinymceEditor:function(t,e,n){return nest.applySnippet("nest",t,e,n)},applyNestToNestListEditor:function(t){var e;return(e=$("._nest-form[data-index='"+t+"']")).find("._reference").val(nest.name()),e.find("._nest-options").val(nest.options()),decko.updateAddItemButton(e)},applySnippet:function(t,e,n,r){var a,s,o;return a=$("._"+t+"-preview").val(),s=tinymce.get(e),null!=n?nest.replaceSnippet(s,n,r,a):(s.insertContent(a),o=nest.offsetAfterInsert(s,a),$("button._"+t+"-apply").attr("data-tm-snippet-start",o)),$("button._"+t+"-apply").attr("data-tm-snippet-size",a.length)},replaceSnippet:function(t,e,n,r){var a,s;return null!=(a=t.selection.getSel())&&null!=a.anchorNode&&null!=a.anchorNode.data?(null==n&&(n=0),s=""+(s=a.anchorNode.data).substr(0,e)+r+s.substr(e+n),a.anchorNode.data=s):t.insertContent(r)},updatePreview:function(t){var e;return null==t&&(t="{{ "+nest.name()+"|"+nest.options()+" }}"),(e=$("._nest-preview")).val(t),e.data("nest-options",nest.options()),e.data("reference",nest.name())}})}).call(this);
6
+ (function(){$(document).ready(function(){return $("body").on("click","button._nest-apply",function(){return null!=$(this).data("index")?nest.applyNestToNestListEditor($(this).data("index")):nest.applyNestToTinymceEditor($(this).data("tinymce-id"),$(this).data("tm-snippet-start"),$(this).data("tm-snippet-size"))}),$("body").on("click","button._image_nest-apply",function(){return nest.applyNestToTinymceEditor($(this).data("tinymce-id"),$(this).data("tm-snippet-start"),$(this).data("tm-snippet-size"))}),$("body").on("click","button._change-create-to-update",function(){var t;return t=$(this).closest("form").find("#success_tinymce_id").val(),nest.changeCreateToUpdate(t)}),$("body").on("click","button._open-nest-editor",function(){var t,e,n,r;return r=(e=$(this).closest("._nest-form")).find("._reference").val(),n=e.find("._nest-options").val(),t=encodeURIComponent("{{"+r+"|"+n+"}}"),nest.openNestEditorForSlot($(this).closest(".card-slot"),$(this).closest(".slotter"),"index="+e.data("index")+"&tm_snippet_raw="+t)})}),window.nest||(window.nest={}),$.extend(nest,{openNestEditor:function(t,e){return null==e&&(e=nest.editParams(t)),this.openEditorForTm(t,e,"nest_editor","modal_nest_editor")},openNestEditorForSlot:function(t,e,n){var r;return r=t[0]?$(t[0]).attr("data-card-name"):":update",nest.request(r,"nest_editor","modal_nest_editor",e,n)},openEditorForTm:function(t,e,n,r){var a,s,o,i;return e+="&tinymce_id="+t.id,o=$("#"+t.id).closest(".card-slot"),s=$("#"+t.id).closest(".card-editor"),i=$("#"+t.id),0===(a=s[0]&&$(s[0]).attr("card_name")||o[0]&&$(o[0]).attr("data-card-name")||":update").length&&(a=":update"),nest.request(a,n,r,i,e)},openImageEditor:function(t){var e;return null==e&&(e=nest.editParams(t,"{{","}}",!1)),this.openEditorForTm(t,e,"nest_image","modal_nest_image")},changeCreateToUpdate:function(t){var e,n;return n=(e=$("#"+t).closest("form")).attr("action").replace("card/create","card/update"),e.attr("action",n)},insertNest:function(t,e){return t.insertContent(e)},request:function(t,e,n,r,a){var s,o,i;return o=$(".board-sidebar > ._overlay-container-placeholder > .card-slot"),o=$($(".card-slot")[0]),i=n,s="modal",nest.sendRequest(r,o,s,t,i,a)},sendRequest:function(t,e,n,r,a,s){var o;return null==s&&(s=""),o="/"+r+"?view="+a+"&"+s,$.ajax({url:o,success:function(r){return e.slotContent(r,n,t)}})},editParams:function(t,e,n,r){var a,s,o,i,d,l,c,p,u;return null==e&&(e="{{"),null==n&&(n="}}"),null==r&&(r=!0),null==(p=t.selection.getSel())||null==p.anchorNode?nest.paramsStr(0):(u=p.anchorNode.data)?(c=p.anchorOffset,s=u.substr(0,c),a=u.substr(c),(o={before:{close:s.lastIndexOf(n),open:s.lastIndexOf(e)},after:{close:a.indexOf(n),open:a.indexOf(e)}}).before.open>o.before.close&&-1!==o.after.close&&(-1===o.after.open||o.after.close<o.after.open)?(l=o.before.open,null==i&&(d=o.after.close+c+2-l,i=u.substr(l,d)),r?nest.paramsStr(l,i):nest.paramsStr(l+d)):nest.paramsStr(c)):nest.paramsStr(p.anchorOffset)},paramsStr:function(t,e){var n;return n="",null!=t&&(n+="&tm_snippet_start="+t),null!=e&&e.length>0&&(n+="&tm_snippet_raw="+encodeURIComponent(e)),n},offsetAfterInsert:function(t,e){return t.selection.getSel().anchorOffset-e.lengthr},applyNestToTinymceEditor:function(t,e,n){return nest.applySnippet("nest",t,e,n)},applyNestToNestListEditor:function(t){var e;return(e=$("._nest-form[data-index='"+t+"']")).find("._reference").val(nest.name()),e.find("._nest-options").val(nest.options()),decko.updateAddItemButton(e)},applySnippet:function(t,e,n,r){var a,s,o;return a=$("._"+t+"-preview").val(),s=tinymce.get(e),null!=n?nest.replaceSnippet(s,n,r,a):(s.insertContent(a),o=nest.offsetAfterInsert(s,a),$("button._"+t+"-apply").attr("data-tm-snippet-start",o)),$("button._"+t+"-apply").attr("data-tm-snippet-size",a.length)},replaceSnippet:function(t,e,n,r){var a,s;return null!=(a=t.selection.getSel())&&null!=a.anchorNode&&null!=a.anchorNode.data?(null==n&&(n=0),s=""+(s=a.anchorNode.data).substr(0,e)+r+s.substr(e+n),a.anchorNode.data=s):t.insertContent(r)},updatePreview:function(t){var e;return null==t&&(t="{{ "+nest.name()+"|"+nest.options()+" }}"),(e=$("._nest-preview")).val(t),e.data("nest-options",nest.options()),e.data("reference",nest.name())}})}).call(this);
7
7
  // nest_editor_name.js.coffee
8
8
  (function(){var e;e=null,$(document).ready(function(){var t;return t=!1,$("body").on("click","._nest-field-toggle",function(){return $(this).is(":checked")?nest.addPlus():nest.removePlus(),t?nest.addPlus():nest.removePlus(),t=!t}),$("body").on("input","input._nest-name",function(t){if(nest.nameChanged(),13!==t.which)return e&&clearTimeout(e),e=setTimeout(function(){return nest.updateNameRelatedTabs()},700)}),$("body").on("keydown","input._nest-name",function(t){if(13===t.which)return e&&clearTimeout(e),nest.updateNameRelatedTabs()})}),$.extend(nest,{name:function(){return nest.evalFieldOption($("input._nest-name").val())},nameChanged:function(){var e;return e=$("._nest-preview").val().replace(/^\{\{[^}|]*/,"{{"+nest.name()),nest.updatePreview(e)},evalFieldOption:function(e){return nest.isField()?"+"+e:e},isField:function(){return $(".show-prefix > ._field-indicator").length>0},addPlus:function(){var e;return e=$("._nest-preview").val().replace(/^\{\{\+?/,"{{+"),nest.updatePreview(e),$(".input-group.hide-prefix").removeClass("hide-prefix").addClass("show-prefix")},removePlus:function(){var e;return e=$("._nest-preview").val().replace(/^\{\{\+?/,"{{"),nest.updatePreview(e),$(".input-group.show-prefix").removeClass("show-prefix").addClass("hide-prefix")},rulesTabSlot:function(){return $("._nest-editor .tab-pane-rules > .card-slot")},contentTabSlot:function(){return $("._nest-editor .tab-pane-content > .card-slot")},tabPanel:function(){return $("._nest-editor .tab-panel")},emptyNameAlert:function(e){return e?$("._empty-nest-name-alert").removeClass("d-none"):$("._empty-nest-name-alert:not(.d-none)").addClass("d-none")},updateNameRelatedTabs:function(){return nest.name().length>0?nest.tabPanel().show():nest.tabPanel().hide(),nest.updateRulesTab(),nest.updateContentTab()},updateContentTab:function(){var e,t;if((e=nest.contentTabSlot()).length>0)return t=decko.path(nest.fullName()+"?view=nest_content"),nest.updateNameDependentSlot(e,t)},updateRulesTab:function(){var e,t;return e=nest.rulesTabSlot(),t=decko.path(nest.setNameForRules()+"?view=nest_rules"),nest.updateNameDependentSlot(e,t)},updateNameDependentSlot:function(e,t){var n;return null!=(n=$("input._nest-name").val())&&n.length>0?(nest.emptyNameAlert(!1),e.slotReload(t)):(e.slotClear(),nest.emptyNameAlert(!0))},fullName:function(){var e,t;return t=(e=$("input._nest-name")).val(),nest.isField()&&e.attr("data-left-name")?e.attr("data-left-name")+"+"+t:t},setNameForRules:function(){var e,t;return t=(e=$("input._nest-name")).val(),nest.isField()?e.attr("data-left-type")?e.attr("data-left-type")+"+"+t+"+*type plus right":t+"+*right":t+"+*self"}})}).call(this);
9
9
  // nest_editor_options.js.coffee
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-tinymce_editor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.4
4
+ version: 0.15.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-04-03 00:00:00.000000000 Z
13
+ date: 2023-04-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: card
@@ -18,28 +18,28 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.105.4
21
+ version: 1.105.5
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 1.105.4
28
+ version: 1.105.5
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: card-mod-edit
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.15.4
35
+ version: 0.15.5
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.15.4
42
+ version: 0.15.5
43
43
  description: ''
44
44
  email:
45
45
  - info@decko.org