Bugzilla – Attachment 87497 Details for
Bug 15326
Add CMS feature
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15326: (follow-up) Move js to footer, use Asset plugin
Bug-15326-follow-up-Move-js-to-footer-use-Asset-pl.patch (text/plain), 5.80 KB, created by
Martin Renvoize (ashimema)
on 2019-04-08 11:16:25 UTC
(
hide
)
Description:
Bug 15326: (follow-up) Move js to footer, use Asset plugin
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-04-08 11:16:25 UTC
Size:
5.80 KB
patch
obsolete
>From 8a231762574ef4c52f012c79c3d6a72238f1b675 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Mon, 25 Jun 2018 14:43:29 +0000 >Subject: [PATCH] Bug 15326: (follow-up) Move js to footer, use Asset plugin > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >Signed-off-by: Michal Denar <black23@gmail.com> > >Signed-off-by: Michal Denar <black23@gmail.com> >Rebased-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../prog/en/modules/tools/cmspages.tt | 115 +++++++++--------- > 1 file changed, 60 insertions(+), 55 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cmspages.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cmspages.tt >index d67bc0f777..d2082ae8a9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cmspages.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cmspages.tt >@@ -1,66 +1,14 @@ > [% USE KohaDates %] > [% USE Koha %] >+[% USE Asset %] >+[% SET footerjs = 1 %] > [% SET link_opac_base = Koha.Preference( 'OPACBaseURL' ) %] > [% SET link_opac = link_opac_base _ '/cgi-bin/koha/opac-cmspages.pl' %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Tools › Pages</title> > [% INCLUDE 'doc-head-close.inc' %] >-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> >+[% Asset.css("css/datatables.css") %] > [% INCLUDE 'datatables.inc' %] >-<script type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce.js"></script> >-<script type="text/javascript">//<![CDATA[ >-$(document).ready(function() { >- $("#pages_table").dataTable($.extend(true, {}, dataTablesDefaults, { >- "aoColumnDefs": [ >- { "aTargets": [ 0, -1 ], "bSortable": false, "bSearchable": false }, >- ], >- "sPaginationType": "full_numbers" >- })); >- >- $("#del_button").on("click",function(){ >- if ($("input[name='ids'][type='checkbox']:checked").length){ >- return confirmDelete(_("Are you sure you want to delete the selected page(s)?")); >- } else { >- alert(_("No pages have been selected.")); >- return false; >- } >- }); >- >- $(".del_single").on("click", function(){ >- return confirmDelete(_("Are you sure you want to delete this page?")); >- }); >- >- $(".SelectAll").on("click", function(){ >- $("input[name='ids'][type='checkbox']").prop("checked", true); >- }); >- >- $(".ClearAll").on("click", function(){ >- $("input[name='ids'][type='checkbox']").prop("checked", false); >- }); >-}); >- >-tinyMCE.init({ >- mode : "textareas", >- theme : "advanced", >- convert_urls : false, >- relative_urls : false, >- content_css : "[% themelang %]/css/tinymce.css", >- plugins : "table,save,advhr,advlink,searchreplace,print,contextmenu", >- theme_advanced_buttons1 : "save,|,bold,italic,|,cut,copy,paste,|,search,replace,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,link,unlink,anchor,cleanup,help,code,advhr,|,print", >- theme_advanced_buttons2 : "tablecontrols,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,removeformat,|,visualaid,|,sub,sup,|,charmap", >- theme_advanced_buttons3 : "", >- theme_advanced_toolbar_location : "top", >- theme_advanced_toolbar_align : "left", >- theme_advanced_path_location : "bottom", >- theme_advanced_resizing : true, >- plugin_insertdate_dateFormat : "%Y-%m-%d", >- plugin_insertdate_timeFormat : "%H:%M:%S", >- apply_source_formatting : true, >- height : "300", >- width : "700" >-//]]> >-}); >-</script> > </head> > <body id="tools_koha-content" class="tools"> > [% INCLUDE 'header.inc' %] >@@ -323,4 +271,61 @@ tinyMCE.init({ > </div> > [% END %] > </div> >+[% MACRO jsinclude BLOCK %] >+[% Asset.js("lib/tiny_mce/tiny_mce.js") %] >+<script type="text/javascript">//<![CDATA[ >+$(document).ready(function() { >+ $("#pages_table").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aoColumnDefs": [ >+ { "aTargets": [ 0, -1 ], "bSortable": false, "bSearchable": false }, >+ ], >+ "sPaginationType": "full_numbers" >+ })); >+ >+ $("#del_button").on("click",function(){ >+ if ($("input[name='ids'][type='checkbox']:checked").length){ >+ return confirmDelete(_("Are you sure you want to delete the selected page(s)?")); >+ } else { >+ alert(_("No pages have been selected.")); >+ return false; >+ } >+ }); >+ >+ $(".del_single").on("click", function(){ >+ return confirmDelete(_("Are you sure you want to delete this page?")); >+ }); >+ >+ $(".SelectAll").on("click", function(){ >+ $("input[name='ids'][type='checkbox']").prop("checked", true); >+ }); >+ >+ $(".ClearAll").on("click", function(){ >+ $("input[name='ids'][type='checkbox']").prop("checked", false); >+ }); >+}); >+ >+tinyMCE.baseURL = "[% interface %]/lib/tiny_mce"; >+tinyMCE.init({ >+ mode : "textareas", >+ theme : "advanced", >+ convert_urls : false, >+ relative_urls : false, >+ content_css : "[% interface %]/[% theme %]/css/tinymce.css", >+ plugins : "table,save,advhr,advlink,searchreplace,print,contextmenu", >+ theme_advanced_buttons1 : "save,|,bold,italic,|,cut,copy,paste,|,search,replace,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,link,unlink,anchor,cleanup,help,code,advhr,|,print", >+ theme_advanced_buttons2 : "tablecontrols,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,removeformat,|,visualaid,|,sub,sup,|,charmap", >+ theme_advanced_buttons3 : "", >+ theme_advanced_toolbar_location : "top", >+ theme_advanced_toolbar_align : "left", >+ theme_advanced_path_location : "bottom", >+ theme_advanced_resizing : true, >+ plugin_insertdate_dateFormat : "%Y-%m-%d", >+ plugin_insertdate_timeFormat : "%H:%M:%S", >+ apply_source_formatting : true, >+ height : "300", >+ width : "700" >+}); >+//]]> >+</script> >+[% END %] > [% INCLUDE 'intranet-bottom.inc' %] >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15326
:
45621
|
58272
|
58607
|
58608
|
58609
|
58787
|
63904
|
63905
|
64241
|
64941
|
64942
|
66255
|
70866
|
70867
|
70868
|
70869
|
70870
|
70871
|
76387
|
76388
|
76389
|
76390
|
76391
|
76392
|
78232
|
78233
|
78234
|
78235
|
78236
|
78237
|
78238
|
78240
|
79269
|
83318
|
83319
|
83320
|
83321
|
83322
|
83323
|
83324
|
83325
|
83326
|
83404
|
83405
|
83406
|
83407
|
83408
|
83409
|
83410
|
83411
|
83412
|
84682
|
84683
|
84684
|
84685
|
84686
|
84687
|
84688
|
84689
|
84690
|
84691
|
87494
|
87495
|
87496
|
87497
|
87498
|
87499
|
87500
|
87501
|
87502
|
87503
|
87608
|
87609
|
87610
|
87617
|
96084
|
96085
|
96086
|
96087
|
96088
|
96089
|
96090
|
96091
|
96092
|
96093
|
96094
|
96095
|
96096
|
96097
|
96098
|
97237
|
101565
|
101566
|
101567
|
101568
|
101569
|
101570
|
101571
|
101572
|
101573
|
101574
|
101575
|
101576
|
101577
|
101578
|
101579
|
101580
|
128341
|
128342
|
128343
|
128344
|
128345
|
128346
|
128347
|
128348
|
128349
|
128350
|
128351
|
128352
|
128353
|
128354
|
128355
|
128356
|
128357
|
128585
|
128642
|
136432
|
136757
|
136768
|
138489
|
138493
|
139028
|
139029
|
139030
|
139031
|
139111
|
139123
|
139124
|
139125
|
139172
|
139173
|
139174