Commit 1c26762e authored by nextime's avatar nextime

Moved optimized css/js of standard gui in resources

parent a14fc69c
<?
$GUIDEBUG=FALSE;
$GUIDEBUG=TRUE;
//$GUIDEBUG=TRUE;
function getBaseGuiPath()
......
......@@ -709,42 +709,43 @@
if(es.readystate=='CLOSED')
es = new EventSource("/sse");
}
$(window).load(function(){
$.get("/rest/v1.2/daemonstatus/json",
function(r){
if(r.data=='boardsdetection')
{
$("#modal_fixed").load('/resources/modals/autodetection_run.html');
$("#modal_fixed").modal('show');
}
}
);
setInterval(function(i){
//console.debug("setinterval");
$.get("/rest/v1.2/keepalive/json",
$.get("/rest/v1.2/daemonstatus/json",
function(r){
//console.debug(r);
//console.debug("getok");
//if('vibrate' in navigator) {
// // ... vibrate for a second
// navigator.vibrate(1000);
//}
if(r.data=='SLOGGEDOUT')
if(r.data=='boardsdetection')
{
location.reload();
$("#modal_fixed").load('/resources/modals/autodetection_run.html');
$("#modal_fixed").modal('show');
}
if($("#modal_offline").attr('aria-hidden')=='false')
$("#modal_offline").modal('hide');
}).fail(function(r){
console.debug("getfail");
console.debug(r);
$("#modal_offline").modal('show');
}
);
},5000);
$.get("/rest/v1.2/notifications/count/json", function(r){ $("#notifybadge").text(r.data);});
setInterval(function(i){
//console.debug("setinterval");
$.get("/rest/v1.2/keepalive/json",
function(r){
//console.debug(r);
//console.debug("getok");
//if('vibrate' in navigator) {
// // ... vibrate for a second
// navigator.vibrate(1000);
//}
if(r.data=='SLOGGEDOUT')
{
location.reload();
}
if($("#modal_offline").attr('aria-hidden')=='false')
$("#modal_offline").modal('hide');
}).fail(function(r){
console.debug("getfail");
console.debug(r);
$("#modal_offline").modal('show');
}
);
},5000);
$.get("/rest/v1.2/notifications/count/json", function(r){ $("#notifybadge").text(r.data);});
});
......@@ -10,7 +10,6 @@ CSS="../../resources/bootstrap/css/bootstrap.min.css
../../resources/bootstrap-switch/static/stylesheets/bootstrap-switch.css
../../resources/js/jqplot/jquery.jqplot.min.css
../../resources/noUiSlider/jquery.nouislider.css
css/style.css
"
JS="
......@@ -21,7 +20,6 @@ JS="
js/starthammer.js
../../resources/hammer.js/plugins/jquery.hammer.js/jquery.hammer.js
../../resources/bootstrap/js/bootstrap.min.js
../../resources/js/respond.min.js
../../resources/bootstrap-switch/static/js/bootstrap-switch.min.js
../../resources/Snap.js/snap.min.js
../../resources/AppScroll.js/AppScroll.min.js
......@@ -44,10 +42,9 @@ js/starthammer.js
../../resources/css-element-queries/src/ElementQueries.js
js/fastclick.js
js/speech.js
js/domotika.js
"
echo -n > css/combined.min.css
echo -n > js/combined.min.js
echo -n > ../../resources/gui/css/combined.min.css
echo -n > ../../resources/gui/js/combined.min.js
export IFS="
"
for c in $CSS
......@@ -61,7 +58,7 @@ for c in $CSS
echo "already minified..."
cp $c /tmp/$o.compressed
fi
cat /tmp/$o.compressed >> css/combined.min.css
cat /tmp/$o.compressed >> ../../resources/gui/css/combined.min.css
done
for j in $JS
......@@ -73,20 +70,20 @@ for j in $JS
#java -jar ../../../tools/compiler.jar --js $mydir/$j --js_output_file /tmp/$o.compressed >/dev/null 2>&1
$YUI --type js --nomunge -o /tmp/$o.compressed $j >/dev/null 2>&1
if [ -f /tmp/$o.compressed ] ; then
cat /tmp/$o.compressed >> js/combined.min.js
cat /tmp/$o.compressed >> ../../resources/gui/js/combined.min.js
else
echo "cannot use closure, use htmlcompressor..."
#sed -e 's/ \/\/.*$//' $mydir/$j > /tmp/$o.pass1
#java -jar ../../../tools/htmlcompressor-1.5.3.jar --nomunge -o /tmp/$o.compressed /tmp/$o.pass1
cp $mydir/$j /tmp/$o.compressed
cat /tmp/$o.compressed >> js/combined.min.js
cat /tmp/$o.compressed >> ../../resources/gui/js/combined.min.js
fi
else
echo "already minified..."
cat $j >> js/combined.min.js
cat $j >> ../../resources/gui/js/combined.min.js
fi
echo -n 'SIZE: '
du -chs js/combined.min.js
du -chs ../../resources/gui/js/combined.min.js
done
......@@ -52,7 +52,7 @@ function chartsPlot()
}
}
$(document).ready(function(){
$(window).load(function(){
chartsPlot();
setInterval(chartsPlot, 10000);
});
......
......@@ -12,7 +12,9 @@
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="/resources/bootstrap/js/bootstrap.min.js"></script>
<!-- Optionally enable responsive features in IE8 -->
<!--[if IE 8]>
<script src="/resources/js/respond.min.js"></script>
<![endif]-->
<!-- bootstrap switch -->
<script src="/resources/bootstrap-switch/static/js/bootstrap-switch.min.yui.js"></script>
<!-- Snap.js -->
......@@ -45,5 +47,6 @@
<script src="<?=$BASEGUIPATH;?>/js/speech.js"></script>
<script src="<?=$BASEGUIPATH;?>/js/domotika.js"></script>
<? } else { ?>
<script src="<?=$BASEGUIPATH;?>/js/combined.min.js"></script>
<script src="/resources/gui/js/combined.min.js"></script>
<script src="<?=$BASEGUIPATH;?>/js/domotika.js"></script>
<? } ?>
......@@ -25,5 +25,6 @@
<link href="<?=$BASEGUIPATH;?>/css/style.css" rel="stylesheet" media="screen" />
<? } else { ?>
<link href="<?=$BASEGUIPATH;?>/css/combined.min.css" rel="stylesheet" media="screen" />
<link href="/resources/gui/css/combined.min.css" rel="stylesheet" media="screen" />
<link href="<?=$BASEGUIPATH;?>/css/style.css" rel="stylesheet" media="screen" />
<? } ?>
a:2:{s:9:"timestamp";i:1388713246;s:12:"translations";a:17:{s:4:"home";s:4:"home";s:5:"blind";s:10:"tapparelle";s:8:"cancello";s:8:"cancelli";s:5:"clima";s:5:"clima";s:4:"door";s:5:"porte";s:3:"led";s:3:"led";s:5:"light";s:4:"luci";s:7:"scenari";s:7:"scenari";s:6:"socket";s:5:"prese";s:6:"valvle";s:7:"valvole";s:6:"sensor";s:7:"sensori";s:6:"camera";s:10:"telecamere";s:6:"window";s:8:"finestre";s:4:"user";s:4:"user";s:4:"none";s:15:"Nessuna Sezione";s:5:"phone";s:8:"telefono";s:5:"index";s:4:"Home";}}
\ No newline at end of file
a:2:{s:9:"timestamp";i:1395332244;s:12:"translations";a:18:{s:4:"home";s:4:"home";s:5:"blind";s:10:"tapparelle";s:8:"cancello";s:8:"cancelli";s:5:"clima";s:5:"clima";s:4:"door";s:5:"porte";s:3:"led";s:3:"led";s:5:"light";s:4:"luci";s:7:"scenari";s:7:"scenari";s:6:"socket";s:5:"prese";s:6:"valvle";s:7:"valvole";s:6:"sensor";s:7:"sensori";s:6:"camera";s:10:"telecamere";s:6:"window";s:8:"finestre";s:4:"user";s:4:"user";s:4:"none";s:15:"Nessuna Sezione";s:5:"phone";s:8:"telefono";s:5:"index";s:4:"Home";s:4:"gate";s:8:"cancelli";}}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -57,6 +57,16 @@ from twisted.web.twcgi import CGIScript, FilteredScript
log = logging.getLogger( 'Webgui' )
curdir=os.path.abspath(os.path.dirname(sys.argv[0]))
EXCLUDELIST=(
'.swf',
'.png',
'.jpg',
'.gif',
'.gz',
'.tgz'
'.zip'
)
class GzipRequest(object):
"""Wrapper for a request that applies a gzip content encoding"""
......@@ -88,6 +98,7 @@ class GzipRequest(object):
if 'content-length' in self.request.headers:
del self.request.headers['content-length']
# Borrow header information from twisted.web2 gzip filter
self.request.headers['pippo']='sarca'
self.request.write('\037\213\010\000' '\0\0\0\0' '\002\377')
self.crc = zlib.crc32(data, self.crc)
self.size += len(data)
......@@ -117,7 +128,7 @@ class StaticFile(static.File):
# Some flash file ( flowplayer.. ) needs
# to be server without gzip compression or
# they will not work sometime...
if self.basename().endswith('.swf'):
if self.basename().endswith(EXCLUDELIST):
return static.File.render(self, request)
accept_encoding = request.getHeader('accept-encoding')
if accept_encoding:
......
......@@ -40,6 +40,7 @@ import logging
log = logging.getLogger( 'Proxy' )
class WebProxyClient(ProxyClient):
def handleHeader(self, key, value):
if key.lower() == 'location':
log.debug("Manage location header")
......
-----BEGIN CERTIFICATE-----
MIIEGTCCAwGgAwIBAgIJAMk5siMVWV4UMA0GCSqGSIb3DQEBBQUAMIGiMQswCQYD
VQQGEwJJVDEOMA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bT+OpbM7WXgt1pR3Kt/vKF2QnXq
CnkqUD/Fe76qt77FSMGvC+H+6DRbWSLeO9ZvCZnmHF4DjUY9K/YZARHISHTcT2WT
1EHg8bxcz+L2cS7NHw/djcHA0VsHsTxxOF2KgPh3AoGBAJCtVAkBFII6yZmOfAFQ
3Ontxmzt3bVsanlNtqL7xLR6NU9T6Ynl4JbXpDFwl23mibBX9jTcvmHZh4kdtSa4
retkIECZ42rfguyeRrwlcAX/ARiOKPrdpZRoPQdTKMlyM7OQguhHwYIqyQ1MpJ82
Z5+d3/CXX/yQDSsCpTKCM/DBAoGAb/hEhffsm0uj3k9W6t0q5m/hyLXE91U14m7E
zDeh5RnzMnnLw5tvPGxdquA4bae8HDouTgmtCWG4kcD4OxgsU6NcZMG6r8EFKQts
M9nBZ4loCfq2y7xiorru7EJCuJClJFMJCyuQVzMfZwE551QCs1/md6kp+2NcelNn
lH9xFpUCgYBlqBgpUl0q0wm1licX2yRNH4Kew51blUgO6MVMBwn98ZS0a42/j926
4PLSp1tqlFP2XQUtOC54ze4Zp4/o3G6PtyrDV9BWEP0cjddXc/IuVvWDbbXrKU4k
/1d7z8+GUfqdAei8w8mELvFXJwtbV8DkKGOKuf6puPDbgbU0WpFn9A==
-----END RSA PRIVATE KEY-----
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment