aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl
diff options
context:
space:
mode:
authorSebastien SAUVAGE <sebsauvage@sebsauvage.net>2013-09-25 21:27:50 +0200
committerSebastien SAUVAGE <sebsauvage@sebsauvage.net>2013-09-25 21:27:50 +0200
commit246e9b4e37cf85a04f52a22a61a4e705d51f96b4 (patch)
tree7bdecca36f5d248025248bf226525b0d74fd158b /tpl
parentaf77b2fd9a574ba03b309ea0799946fabf37c7d1 (diff)
downloadShaarli-246e9b4e37cf85a04f52a22a61a4e705d51f96b4.tar.gz
Shaarli-246e9b4e37cf85a04f52a22a61a4e705d51f96b4.tar.zst
Shaarli-246e9b4e37cf85a04f52a22a61a4e705d51f96b4.zip
Removed jQuery from almost all pages
jQuery has been removed from all pages, except those who really require it (like autocomplete in link edition). Immediate gain: All pages weight 286 kb LESS ! \o/ Highlighting in search results has also been temporarly removed (and will be re-implemented).
Diffstat (limited to 'tpl')
-rw-r--r--tpl/changetag.html12
-rw-r--r--tpl/editlink.html12
-rw-r--r--tpl/includes.html1
-rw-r--r--tpl/linklist.html1
-rw-r--r--tpl/page.footer.html21
-rw-r--r--tpl/picwall.html4
6 files changed, 25 insertions, 26 deletions
diff --git a/tpl/changetag.html b/tpl/changetag.html
index b0bd0d06..b22bddea 100644
--- a/tpl/changetag.html
+++ b/tpl/changetag.html
@@ -1,6 +1,8 @@
1<!DOCTYPE html> 1<!DOCTYPE html>
2<html> 2<html>
3<head>{include="includes"}</head> 3<head>{include="includes"}
4{if="empty($GLOBALS['disablejquery'])"}<script src="inc/jquery.min.js#"></script><script src="inc/jquery-ui.min.js#"></script>{/if}
5</head>
4<body onload="document.changetag.fromtag.focus();"> 6<body onload="document.changetag.fromtag.focus();">
5<div id="pageheader"> 7<div id="pageheader">
6 {include="page.header"} 8 {include="page.header"}
@@ -12,5 +14,13 @@
12<script language="JavaScript">function confirmDeleteTag() { var agree=confirm("Are you sure you want to delete this tag from all links ?"); if (agree) return true ; else return false ; }</script> 14<script language="JavaScript">function confirmDeleteTag() { var agree=confirm("Are you sure you want to delete this tag from all links ?"); if (agree) return true ; else return false ; }</script>
13</div> 15</div>
14{include="page.footer"} 16{include="page.footer"}
17{if="($GLOBALS['config']['OPEN_SHAARLI'] || isLoggedIn()) && empty($GLOBALS['disablejquery'])"}
18<script language="JavaScript">
19$(document).ready(function()
20{
21 $('#fromtag').autocomplete({source:'{$source}?ws=singletag',minLength:1});
22});
23</script>
24{/if}
15</body> 25</body>
16</html> \ No newline at end of file 26</html> \ No newline at end of file
diff --git a/tpl/editlink.html b/tpl/editlink.html
index ad549137..4a2c30cc 100644
--- a/tpl/editlink.html
+++ b/tpl/editlink.html
@@ -1,6 +1,8 @@
1<!DOCTYPE html> 1<!DOCTYPE html>
2<html> 2<html>
3<head>{include="includes"}</head> 3<head>{include="includes"}
4{if="empty($GLOBALS['disablejquery'])"}<script src="inc/jquery.min.js#"></script><script src="inc/jquery-ui.min.js#"></script>{/if}
5</head>
4<body 6<body
5{if condition="$link.title==''"}onload="document.linkform.lf_title.focus();" 7{if condition="$link.title==''"}onload="document.linkform.lf_title.focus();"
6{elseif condition="$link.description==''"}onload="document.linkform.lf_description.focus();" 8{elseif condition="$link.description==''"}onload="document.linkform.lf_description.focus();"
@@ -30,5 +32,13 @@
30 </div> 32 </div>
31</div> 33</div>
32{include="page.footer"} 34{include="page.footer"}
35{if="($GLOBALS['config']['OPEN_SHAARLI'] || isLoggedIn()) && empty($GLOBALS['disablejquery'])"}
36<script language="JavaScript">
37$(document).ready(function()
38{
39 $('#lf_tags').autocomplete({source:'{$source}?ws=tags',minLength:1});
40});
41</script>
42{/if}
33</body> 43</body>
34</html> \ No newline at end of file 44</html> \ No newline at end of file
diff --git a/tpl/includes.html b/tpl/includes.html
index e0ad00d5..2b61f1e1 100644
--- a/tpl/includes.html
+++ b/tpl/includes.html
@@ -7,4 +7,3 @@
7<link href="images/favicon.ico#" rel="shortcut icon" type="image/x-icon" /> 7<link href="images/favicon.ico#" rel="shortcut icon" type="image/x-icon" />
8<link type="text/css" rel="stylesheet" href="inc/shaarli.css?version={$version|urlencode}#" /> 8<link type="text/css" rel="stylesheet" href="inc/shaarli.css?version={$version|urlencode}#" />
9{if condition="is_file('inc/user.css')"}<link type="text/css" rel="stylesheet" href="inc/user.css?version={$version}#" />{/if} 9{if condition="is_file('inc/user.css')"}<link type="text/css" rel="stylesheet" href="inc/user.css?version={$version}#" />{/if}
10{if="empty($GLOBALS['disablejquery'])"}<script src="inc/jquery.min.js#"></script><script src="inc/jquery-ui.min.js#"></script>{/if}
diff --git a/tpl/linklist.html b/tpl/linklist.html
index bce3fa9f..ddc38cb0 100644
--- a/tpl/linklist.html
+++ b/tpl/linklist.html
@@ -68,7 +68,6 @@
68 {include="page.footer"} 68 {include="page.footer"}
69 69
70<script language="JavaScript"> 70<script language="JavaScript">
71
72// Remove any displayed QR-Code 71// Remove any displayed QR-Code
73function remove_qrcode() 72function remove_qrcode()
74{ 73{
diff --git a/tpl/page.footer.html b/tpl/page.footer.html
index 3aa47ba6..8e5869c5 100644
--- a/tpl/page.footer.html
+++ b/tpl/page.footer.html
@@ -7,24 +7,3 @@
7{if="isLoggedIn()"} 7{if="isLoggedIn()"}
8<script language="JavaScript">function confirmDeleteLink() { var agree=confirm("Are you sure you want to delete this link ?"); if (agree) return true ; else return false ; }</script> 8<script language="JavaScript">function confirmDeleteLink() { var agree=confirm("Are you sure you want to delete this link ?"); if (agree) return true ; else return false ; }</script>
9{/if} 9{/if}
10
11{if="($GLOBALS['config']['OPEN_SHAARLI'] || isLoggedIn()) && empty($GLOBALS['disablejquery'])"}
12<script language="JavaScript">
13$(document).ready(function()
14{
15 $('#lf_tags').autocomplete({source:'{$source}?ws=tags',minLength:1});
16 $('#searchtags').autocomplete({source:'{$source}?ws=tags',minLength:1});
17 $('#fromtag').autocomplete({source:'{$source}?ws=singletag',minLength:1});
18});
19</script>
20{/if}
21
22{if="empty($GLOBALS['disablejquery']) && isset($_GET['searchterm'])"}
23<script src="inc/jquery.highlight.js#"></script>
24<script language="JavaScript">
25$(document).ready(function()
26{
27 $('#linklist li').highlight("{$search_crits}");
28});
29</script>
30{/if} \ No newline at end of file
diff --git a/tpl/picwall.html b/tpl/picwall.html
index 631e0866..b78e2609 100644
--- a/tpl/picwall.html
+++ b/tpl/picwall.html
@@ -2,7 +2,9 @@
2<html> 2<html>
3<head>{include="includes"} 3<head>{include="includes"}
4{if="empty($GLOBALS['disablejquery'])"} 4{if="empty($GLOBALS['disablejquery'])"}
5 <script src="inc/jquery.lazyload.min.js#"></script> 5<script src="inc/jquery.min.js#"></script>
6<script src="inc/jquery-ui.min.js#"></script>
7<script src="inc/jquery.lazyload.min.js#"></script>
6{/if} 8{/if}
7</head> 9</head>
8<body> 10<body>