mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Merge pull request #725 from lasanthaDLPDS/master
Improving Android Sense UI
This commit is contained in:
commit
fc83514648
@ -41,10 +41,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<a class="details-view-toggle-button" data-toggle="tooltip" title="Stored Data"
|
<a class="details-view-toggle-button" data-toggle="tooltip" title="Stored Data"
|
||||||
href="{{@app.context}}/device/{{../../device.type}}/analytics?deviceId={{../../device.deviceIdentifier}}&deviceName={{../../device.name}}&graphType={{@key}}&sensor={{this}}">
|
href="{{@app.context}}/device/{{../../device.type}}/analytics?deviceId={{../../device.deviceIdentifier}}&deviceName={{../../device.name}}&graphType={{@key}}&sensor={{this}}">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-circle-outline fw-stack-2x "></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-statistics fw-stack-1x "></i>
|
<i class="fw fw-statistics fw-stack-1x"></i>
|
||||||
</span>
|
<span class="fw-stack fw-move-right fw-move-bottom">
|
||||||
|
<i class="fw fw-circle fw-stack-2x fw-stroke"></i>
|
||||||
|
<i class="fw fw-clock fw-stack-1x fw-inverse"></i>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||||
*
|
*
|
||||||
* WSO2 Inc. licenses this file to you under the Apache License,
|
* WSO2 Inc. licenses this file to you under the Apache License,
|
||||||
* Version 2.0 (the "License"); you may not use this file except
|
* Version 2.0 (the "License"); you may not use this file except
|
||||||
@ -78,6 +78,8 @@ var graphMap = {};
|
|||||||
|
|
||||||
var palette = new Rickshaw.Color.Palette({scheme: "munin"});
|
var palette = new Rickshaw.Color.Palette({scheme: "munin"});
|
||||||
|
|
||||||
|
var elemTop;
|
||||||
|
|
||||||
$(window).load(function () {
|
$(window).load(function () {
|
||||||
|
|
||||||
graphMap["battery"]=lineGraph("battery", batteryData);
|
graphMap["battery"]=lineGraph("battery", batteryData);
|
||||||
@ -321,7 +323,7 @@ function maximizeGraph(graph, width,height){
|
|||||||
height: height*2
|
height: height*2
|
||||||
|
|
||||||
});
|
});
|
||||||
graph.render();
|
graph.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
function minimizeGraph(graph){
|
function minimizeGraph(graph){
|
||||||
@ -329,7 +331,7 @@ function minimizeGraph(graph){
|
|||||||
width: 366,
|
width: 366,
|
||||||
height: 300
|
height: 300
|
||||||
});
|
});
|
||||||
graph.render();
|
graph.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
//maximize minimize functionality
|
//maximize minimize functionality
|
||||||
@ -339,17 +341,30 @@ $(".fw-expand").click(function(e) {
|
|||||||
var height = $(".chartWrapper").height();
|
var height = $(".chartWrapper").height();
|
||||||
|
|
||||||
if($(this).hasClass("default-view")){
|
if($(this).hasClass("default-view")){
|
||||||
|
elemTop = $('#'+innerGraph.element.id).parents('.graph')[0].offsetTop;
|
||||||
$(this).removeClass("default-view");
|
$(this).removeClass("default-view");
|
||||||
|
$(this).removeClass("fw-expand");
|
||||||
|
$(this).addClass("fw-contract");
|
||||||
maximizeGraph(innerGraph,width,height);
|
maximizeGraph(innerGraph,width,height);
|
||||||
$(this).parent().parent().addClass("max");
|
$(this).parent().parent().addClass("max");
|
||||||
$(this).closest(".graph").siblings().addClass("max_hide");
|
$(this).closest(".graph").siblings().addClass("max_hide");
|
||||||
$(this).closest(".graph").parent().siblings().addClass("max_hide");
|
$(this).closest(".graph").parent().siblings().addClass("max_hide");
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
$(this).addClass("default-view");
|
$(this).addClass("default-view");
|
||||||
|
$(this).addClass("fw-expand");
|
||||||
|
$(this).removeClass("fw-contract");
|
||||||
minimizeGraph(innerGraph);
|
minimizeGraph(innerGraph);
|
||||||
$(this).parent().parent().removeClass("max");
|
$(this).parent().parent().removeClass("max");
|
||||||
$(this).closest(".graph").siblings().removeClass("max_hide");
|
$(this).closest(".graph").siblings().removeClass("max_hide");
|
||||||
$(this).closest(".graph").parent().siblings().removeClass("max_hide");
|
$(this).closest(".graph").parent().siblings().removeClass("max_hide");
|
||||||
|
focusToArea()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//graph focusing function
|
||||||
|
function focusToArea(){
|
||||||
|
var container = $("body");
|
||||||
|
container.animate({
|
||||||
|
scrollTop: elemTop
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
"scopes" : [
|
"scopes" : [
|
||||||
"perm:android-sense:enroll"
|
"perm:android-sense:enroll"
|
||||||
],
|
],
|
||||||
"analyticsView" : "DAS"
|
"analyticsView" : "DAS",
|
||||||
|
"analyticsEnabled": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user