Skip to content

Commit

Permalink
Adding one more loader opendcim#1004
Browse files Browse the repository at this point in the history
  • Loading branch information
wilpig committed Jan 30, 2018
1 parent 673294b commit e9ca247
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 3 deletions.
1 change: 1 addition & 0 deletions classes/DeviceTemplate.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ function GetCustomValues() {
a.AttributeID=v.AttributeID AND TemplateID=$this->TemplateID ORDER BY Label,
AttributeID;";
foreach($this->query($sql) as $tdcrow) {
$this->{$tdcrow["Label"]}=$tdcrow["Value"];
$tdca[$tdcrow["AttributeID"]]["value"]=$tdcrow["Value"];
$tdca[$tdcrow["AttributeID"]]["required"]=$tdcrow["Required"];
}
Expand Down
48 changes: 47 additions & 1 deletion css/inventory.php
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,53 @@
.box.blue {background-color: <?php echo $config->ParameterArray['HeaderColor']; ?>;}

/* rotatingloader - END */

/* rollingbox - START */
.boxLoading {
width: 50px;
height: 50px;
margin: auto;
position: relative;
left: 0;
right: 0;
top: 25%;
bottom: 0;
}
.boxLoading:before {
content: '';
width: 50px;
height: 5px;
background: #000;
opacity: 0.1;
position: absolute;
top: 59px;
left: 0;
border-radius: 50%;
animation: shadow .5s linear infinite;
}
.boxLoading:after {
content: '';
width: 50px;
height: 50px;
background: <?php echo $config->ParameterArray['HeaderColor']; ?>;
animation: animate .5s linear infinite;
position: absolute;
top: 0;
left: 0;
border-radius: 3px;
}
@keyframes animate {
17% {border-bottom-right-radius: 3px;}
25% {transform: translateY(9px) rotate(22.5deg);}
50% {transform: translateY(18px) scale(1, 0.9) rotate(45deg);border-bottom-right-radius: 40px;}
75% {transform: translateY(9px) rotate(67.5deg);}
100% {transform: translateY(0) rotate(90deg);}
}
@keyframes shadow {
0%,
100% {transform: scale(1, 1);}
50% {transform: scale(1.2, 1);}
}
/* rollingbox - END */


/* PICTURES */
Expand Down
8 changes: 6 additions & 2 deletions scripts/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -1285,15 +1285,19 @@ var rotatingloader1=rotatingloader.clone().addClass('one');
var rotatingloader2=rotatingloader.clone().addClass('two');
var rotatingloader3=rotatingloader.clone().addClass('three');
var rotatingloader4=rotatingloader.clone().addClass('four');
// https://codepen.io/dicson/pen/vOxZjM
var rollingbox=$('<div>').addClass('boxLoading').addClass('loadingplaceholder');
//
// Uncomment whichever set of loaders we decide to use
//
// -=- all -=-
//var loaders=[ spinningsquares, flippingpostits, multiaxistrainer, rotatingloader1, rotatingloader2, rotatingloader3, rotatingloader4 ]
//var loaders=[ spinningsquares, flippingpostits, multiaxistrainer, rotatingloader1, rotatingloader2, rotatingloader3, rotatingloader4, rollingbox ]
// -=- fun -=-
//var loaders=[ spinningsquares, flippingpostits, multiaxistrainer ]
// -=- semi-professional? -=-
var loaders=[ rotatingloader1, rotatingloader2, rotatingloader3, rotatingloader4 ]
//var loaders=[ rotatingloader1, rotatingloader2, rotatingloader3, rotatingloader4 ]
// -=- stupid simple rolling box -=-
var loaders=[ rollingbox ]

// Cabinet device population
$(document).ready(function(){
Expand Down

0 comments on commit e9ca247

Please sign in to comment.