From 7e9bd977eec3c996119626a4bb2828fc08979db8 Mon Sep 17 00:00:00 2001 From: ArthurHoaro <arthur@hoa.ro> Date: Sat, 24 Feb 2018 18:34:50 +0100 Subject: Webpack / Update front paths in template files --- tpl/default/includes.html | 7 +--- tpl/default/linklist.html | 1 - tpl/default/page.footer.html | 4 +-- tpl/default/picwall.html | 2 +- tpl/default/pluginsadmin.html | 2 +- tpl/vintage/changetag.html | 2 -- tpl/vintage/daily.html | 10 +++--- tpl/vintage/editlink.html | 5 --- tpl/vintage/includes.html | 5 ++- tpl/vintage/linklist.html | 11 ++---- tpl/vintage/linklist.paging.html | 8 ++--- tpl/vintage/page.footer.html | 4 ++- tpl/vintage/picwall.html | 7 +--- tpl/vintage/pluginsadmin.html | 73 +++++++++++++++++++++++++++++++++++++++- tpl/vintage/tools.html | 6 ++-- 15 files changed, 97 insertions(+), 50 deletions(-) (limited to 'tpl') diff --git a/tpl/default/includes.html b/tpl/default/includes.html index b2bfec30..2c56d3c9 100644 --- a/tpl/default/includes.html +++ b/tpl/default/includes.html @@ -6,12 +6,7 @@ <link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" /> <link href="img/favicon.png" rel="shortcut icon" type="image/png" /> <link href="img/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180" /> -<link type="text/css" rel="stylesheet" href="css/pure.min.css?v={$version_hash}" /> -<link type="text/css" rel="stylesheet" href="css/grids-responsive.min.css?v={$version_hash}"> -<link type="text/css" rel="stylesheet" href="css/pure-extras.css?v={$version_hash}"> -<link type="text/css" rel="stylesheet" href="css/font-awesome.min.css?v={$version_hash}" /> -<link type="text/css" rel="stylesheet" href="inc/awesomplete.css?v={$version_hash}#" /> -<link type="text/css" rel="stylesheet" href="css/shaarli.css?v={$version_hash}" /> +<link type="text/css" rel="stylesheet" href="css/shaarli.min.css?v={$version_hash}" /> {if="is_file('data/user.css')"} <link type="text/css" rel="stylesheet" href="data/user.css#" /> {/if} diff --git a/tpl/default/linklist.html b/tpl/default/linklist.html index c666e30a..933c1ef2 100644 --- a/tpl/default/linklist.html +++ b/tpl/default/linklist.html @@ -16,7 +16,6 @@ </div> <input type="hidden" name="token" value="{$token}"> - <div id="search-linklist"> <form method="GET" class="pure-form searchform" name="searchform"> diff --git a/tpl/default/page.footer.html b/tpl/default/page.footer.html index 659e8c7f..f4f09e92 100644 --- a/tpl/default/page.footer.html +++ b/tpl/default/page.footer.html @@ -38,6 +38,4 @@ </span> </div> -<script src="js/shaarli.js?v={$version_hash}"></script> -<script src="inc/awesomplete.js?v={$version_hash}#"></script> -<script src="inc/awesomplete-multiple-tags.js?v={$version_hash}#"></script> +<script src="js/shaarli.min.js?v={$version_hash}"></script> diff --git a/tpl/default/picwall.html b/tpl/default/picwall.html index 248e56df..23796ac9 100644 --- a/tpl/default/picwall.html +++ b/tpl/default/picwall.html @@ -39,7 +39,7 @@ </div> {include="page.footer"} -<script src="inc/blazy-1.3.1.min.js#"></script> +<script src="js/picwall.min.js?v={$version_hash}"></script> </body> </html> diff --git a/tpl/default/pluginsadmin.html b/tpl/default/pluginsadmin.html index b2d7cdc5..fa26c859 100644 --- a/tpl/default/pluginsadmin.html +++ b/tpl/default/pluginsadmin.html @@ -176,7 +176,7 @@ </form> {include="page.footer"} -<script src="inc/plugin_admin.js#"></script> +<script src="js/pluginsadmin.min.js?v={$version_hash}"></script> </body> </html> diff --git a/tpl/vintage/changetag.html b/tpl/vintage/changetag.html index a0df3328..670a8dd7 100644 --- a/tpl/vintage/changetag.html +++ b/tpl/vintage/changetag.html @@ -1,8 +1,6 @@ <!DOCTYPE html> <html> <head>{include="includes"} - <link type="text/css" rel="stylesheet" href="inc/awesomplete.css#" /> - <script src="inc/awesomplete.min.js#"></script> </head> <body onload="document.changetag.fromtag.focus();"> <div id="pageheader"> diff --git a/tpl/vintage/daily.html b/tpl/vintage/daily.html index e86e90b1..42db16a7 100644 --- a/tpl/vintage/daily.html +++ b/tpl/vintage/daily.html @@ -24,13 +24,13 @@ {/loop} <br> - <a href="?do=dailyrss" title="1 RSS entry per day"><img src="images/feed-icon-14x14.png#" alt="rss_feed">Daily RSS Feed</a> + <a href="?do=dailyrss" title="1 RSS entry per day"><img src="img/feed-icon-14x14.png" alt="rss_feed">Daily RSS Feed</a> </div> <div class="dailyTitle"> - <img src="images/floral_left.png" width="51" height="50" class="nomobile" alt="floral_left"> + <img src="img/floral_left.png" width="51" height="50" class="nomobile" alt="floral_left"> The Daily Shaarli - <img src="images/floral_right.png" width="51" height="50" class="nomobile" alt="floral_right"> + <img src="img/floral_right.png" width="51" height="50" class="nomobile" alt="floral_right"> </div> <div class="dailyDate"> @@ -50,7 +50,7 @@ <div class="dailyEntry"> <div class="dailyEntryPermalink"> <a href="?{$value.shorturl}"> - <img src="images/squiggle.png" width="25" height="26" title="permalink" alt="permalink"> + <img src="img/squiggle.png" width="25" height="26" title="permalink" alt="permalink"> </a> </div> {if="!$hide_timestamps || isLoggedIn()"} @@ -94,7 +94,7 @@ {$value} {/loop} </div> - <div id="closing"><img src="images/squiggle_closing.png" width="66" height="61" alt="-"></div> + <div id="closing"><img src="img/squiggle_closing.png" width="66" height="61" alt="-"></div> </div> {include="page.footer"} </body> diff --git a/tpl/vintage/editlink.html b/tpl/vintage/editlink.html index f855dfb1..5fa7d194 100644 --- a/tpl/vintage/editlink.html +++ b/tpl/vintage/editlink.html @@ -54,10 +54,5 @@ {if="$source !== 'firefoxsocialapi'"} {include="page.footer"} {/if} -<script src="inc/awesomplete.min.js#"></script> -<script src="inc/awesomplete-multiple-tags.js#"></script> -<script> - awesompleteUniqueTag('#lf_tags'); -</script> </body> </html> diff --git a/tpl/vintage/includes.html b/tpl/vintage/includes.html index 17b78b17..4ddfc840 100644 --- a/tpl/vintage/includes.html +++ b/tpl/vintage/includes.html @@ -5,9 +5,8 @@ <meta name="referrer" content="same-origin"> <link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" /> <link rel="alternate" type="application/atom+xml" href="{$feedurl}?do=atom{$searchcrits}#" title="ATOM Feed" /> -<link href="images/favicon.ico#" rel="shortcut icon" type="image/x-icon" /> -<link type="text/css" rel="stylesheet" href="css/reset.css" /> -<link type="text/css" rel="stylesheet" href="css/shaarli.css" /> +<link href="img/favicon.ico" rel="shortcut icon" type="image/x-icon" /> +<link type="text/css" rel="stylesheet" href="css/shaarli.min.css" /> {if="is_file('data/user.css')"}<link type="text/css" rel="stylesheet" href="data/user.css#" />{/if} {loop="$plugins_includes.css_files"} <link type="text/css" rel="stylesheet" href="{$value}#"/> diff --git a/tpl/vintage/linklist.html b/tpl/vintage/linklist.html index 8458caa1..e7137246 100644 --- a/tpl/vintage/linklist.html +++ b/tpl/vintage/linklist.html @@ -22,7 +22,7 @@ {if="!empty($search_tags)"} value="{$search_tags}" {/if} - autocomplete="off" class="awesomplete" data-multiple data-minChars="1" + autocomplete="off" data-multiple data-minChars="1" data-list="{loop="$tags"}{$key}, {/loop}" > <input type="submit" value="Search" class="bigbutton"> @@ -86,13 +86,13 @@ <div class="linkeditbuttons"> <form method="GET" class="buttoneditform"> <input type="hidden" name="edit_link" value="{$value.id}"> - <input type="image" alt="Edit" src="images/edit_icon.png#" title="Edit" class="button_edit"> + <input type="image" alt="Edit" src="img/edit_icon.png" title="Edit" class="button_edit"> </form><br> <form method="GET" class="buttoneditform"> <input type="hidden" name="lf_linkdate" value="{$value.id}"> <input type="hidden" name="token" value="{$token}"> <input type="hidden" name="delete_link"> - <input type="image" alt="Delete" src="images/delete_icon.png#" title="Delete" + <input type="image" alt="Delete" src="img/delete_icon.png" title="Delete" class="button_delete" onClick="return confirmDeleteLink();"> </form> </div> @@ -146,10 +146,5 @@ {include="page.footer"} -<script src="inc/awesomplete.min.js#"></script> -<script src="inc/awesomplete-multiple-tags.js#"></script> -<script> - awesompleteUniqueTag('#tagfilter_value'); -</script> </body> </html> diff --git a/tpl/vintage/linklist.paging.html b/tpl/vintage/linklist.paging.html index 12828a97..e3b88ee6 100644 --- a/tpl/vintage/linklist.paging.html +++ b/tpl/vintage/linklist.paging.html @@ -1,11 +1,11 @@ <div class="paging"> {if="isLoggedIn()"} <div class="paging_privatelinks"> - <a href="?visibility=private"> + <a href="?visibility=private"> {if="$visibility=='private'"} - <img src="images/private_16x16_active.png#" width="16" height="16" title="Filter links by visibility" alt="Filter links by visibility"> - {else} - <img src="images/private_16x16.png#" width="16" height="16" title="Filter links by visibility" alt="Filter links by visibility"> + <img src="img/private_16x16_active.png" width="16" height="16" title="Click to see all links" alt="Click to see all links"> + {else} + <img src="img/private_16x16.png" width="16" height="16" title="Click to see only private links" alt="Click to see only private links"> {/if} </a> diff --git a/tpl/vintage/page.footer.html b/tpl/vintage/page.footer.html index 4ce0803a..1485e1ce 100644 --- a/tpl/vintage/page.footer.html +++ b/tpl/vintage/page.footer.html @@ -22,11 +22,13 @@ Error: {$versionError} </div> {/if} + +<script src="js/shaarli.min.js"></script> + {if="isLoggedIn()"} <script>function confirmDeleteLink() { var agree=confirm("Are you sure you want to delete this link ?"); if (agree) return true ; else return false ; }</script> {/if} -<script src="js/shaarli.js"></script> {loop="$plugins_footer.js_files"} <script src="{$value}#"></script> {/loop} diff --git a/tpl/vintage/picwall.html b/tpl/vintage/picwall.html index 4e227e37..29688914 100644 --- a/tpl/vintage/picwall.html +++ b/tpl/vintage/picwall.html @@ -1,7 +1,6 @@ <!DOCTYPE html> <html> <head>{include="includes"} -<script src="inc/blazy-1.3.1.min.js#"></script> </head> <body> <div id="pageheader">{include="page.header"}</div> @@ -35,10 +34,6 @@ {include="page.footer"} -<script> -window.onload = function() { - var bLazy = new Blazy(); -} -</script> +<script src="js/picwall.min.js"></script> </body> </html> diff --git a/tpl/vintage/pluginsadmin.html b/tpl/vintage/pluginsadmin.html index ead1734e..63b45cac 100644 --- a/tpl/vintage/pluginsadmin.html +++ b/tpl/vintage/pluginsadmin.html @@ -129,6 +129,77 @@ </div> {include="page.footer"} -<script src="inc/plugin_admin.js#"></script> +<script> + /** + * Change the position counter of a row. + * + * @param elem Element Node to change. + * @param toPos int New position. + */ + function changePos(elem, toPos) { + var elemName = elem.getAttribute('data-line'); + + elem.setAttribute('data-order', toPos); + var hiddenInput = document.querySelector('[name="order_' + elemName + '"]'); + hiddenInput.setAttribute('value', toPos); + } + + /** + * Move a row up or down. + * + * @param pos Element Node to move. + * @param move int Move: +1 (down) or -1 (up) + */ + function changeOrder(pos, move) { + var newpos = parseInt(pos) + move; + var lines = document.querySelectorAll('[data-order="' + pos + '"]'); + var changelines = document.querySelectorAll('[data-order="' + newpos + '"]'); + + // If we go down reverse lines to preserve the rows order + if (move > 0) { + lines = [].slice.call(lines).reverse(); + } + + for (var i = 0; i < lines.length; i++) { + var parent = changelines[0].parentNode; + changePos(lines[i], newpos); + changePos(changelines[i], parseInt(pos)); + var changeItem = move < 0 ? changelines[0] : changelines[changelines.length - 1].nextSibling; + parent.insertBefore(lines[i], changeItem); + } + } + + /** + * Move a row up in the table. + * + * @param pos int row counter. + * + * @returns false + */ + function orderUp(pos) { + if (pos == 0) { + return false; + } + changeOrder(pos, -1); + return false; + } + + /** + * Move a row down in the table. + * + * @param pos int row counter. + * + * @returns false + */ + function orderDown(pos) { + var lastpos = document.querySelector('[data-order]:last-child').getAttribute('data-order'); + if (pos == lastpos) { + return false; + } + + changeOrder(pos, +1); + return false; + } +</script> </body> </html> diff --git a/tpl/vintage/tools.html b/tpl/vintage/tools.html index 69689807..3194844a 100644 --- a/tpl/vintage/tools.html +++ b/tpl/vintage/tools.html @@ -81,9 +81,9 @@ author: "Shaarli", version: "1.0.0", - iconURL: baseURL + "/images/favicon.ico", - icon32URL: baseURL + "/images/favicon.ico", - icon64URL: baseURL + "/images/favicon.ico", + iconURL: baseURL + "/img/favicon.ico", + icon32URL: baseURL + "/img/favicon.ico", + icon64URL: baseURL + "/img/favicon.ico", shareURL: baseURL + "{noparse}?post=%{url}&title=%{title}&description=%{text}&source=firefoxsocialapi{/noparse}", homepageURL: baseURL -- cgit v1.2.3