Skip to content

Commit

Permalink
Merge pull request #721 from hplato/ia7
Browse files Browse the repository at this point in the history
IA7 v1.5.640 - updated bootstrap, weather icons, font awesome, fixed modal
  • Loading branch information
hplato authored Aug 1, 2017
2 parents c6efcdd + a6f0050 commit e27e2b4
Show file tree
Hide file tree
Showing 28 changed files with 3,049 additions and 1,338 deletions.
Binary file added web/ia7/fonts/FontAwesome.otf
Binary file not shown.
Binary file modified web/ia7/fonts/fontawesome-webfont.eot
Binary file not shown.
3,230 changes: 2,668 additions & 562 deletions web/ia7/fonts/fontawesome-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified web/ia7/fonts/fontawesome-webfont.ttf
Binary file not shown.
Binary file modified web/ia7/fonts/fontawesome-webfont.woff
Binary file not shown.
Binary file modified web/ia7/fonts/fontawesome-webfont.woff2
Binary file not shown.
1 change: 1 addition & 0 deletions web/ia7/fonts/weather-icons-wind.2.0.10.min.css

Large diffs are not rendered by default.

Binary file added web/ia7/fonts/weathericons-regular-webfont.eot
Binary file not shown.
257 changes: 257 additions & 0 deletions web/ia7/fonts/weathericons-regular-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified web/ia7/fonts/weathericons-regular-webfont.ttf
Binary file not shown.
Binary file modified web/ia7/fonts/weathericons-regular-webfont.woff
Binary file not shown.
Binary file added web/ia7/fonts/weathericons-regular-webfont.woff2
Binary file not shown.
2 changes: 1 addition & 1 deletion web/ia7/house/main.shtml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<div class='col-sm-12 col-sm-offset-0 col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2'>
<div class='col-sm-12'>
<p class="text-muted"><small> MisterHouse was created by Bruce Winter. Ron Klinkien developed the v2.3 web interface. Kevin Robert Keegan
designed the IA7 web prototype, updates by H.Plato. IA7 v1.5.620 Font Awesome by Dave Gandy - http://fontawesome.io</small></p>
designed the IA7 web prototype, updates by H.Plato. IA7 v1.5.640 Font Awesome by Dave Gandy - http://fontawesome.io</small></p>
</div>
</div>
</div>
Expand Down
File renamed without changes.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions web/ia7/include/bootstrap-theme.min.css.map

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions web/ia7/include/bootstrap.3.3.5.min.css

This file was deleted.

7 changes: 0 additions & 7 deletions web/ia7/include/bootstrap.3.3.5.min.js

This file was deleted.

6 changes: 6 additions & 0 deletions web/ia7/include/bootstrap.3.3.7.min.css

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions web/ia7/include/bootstrap.3.3.7.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions web/ia7/include/bootstrap.min.css.map

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions web/ia7/include/font-awesome.4.3.0.min.css

This file was deleted.

4 changes: 4 additions & 0 deletions web/ia7/include/font-awesome.4.7.0.min.css

Large diffs are not rendered by default.

46 changes: 40 additions & 6 deletions web/ia7/include/javascript.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// v1.5.620
// v1.5.640

var entity_store = {}; //global storage of entities
var json_store = {};
Expand Down Expand Up @@ -2353,6 +2353,7 @@ var floorplan = function(group,time) {
console.log('FP: request failed: "' + textStatus + '" "'+JSON.stringify(errorThrown, undefined,2)+'"');
},
success: function( json, statusText, jqXHR ) {

var requestTime = time;
var last_slider_popover;
if (jqXHR.status === 200) {
Expand Down Expand Up @@ -2745,7 +2746,24 @@ var create_state_modal = function(entity) {
var name = entity;
if (json_store.objects[entity].label !== undefined) name = json_store.objects[entity].label;
$('#slider').remove();
$('#control').modal('show');
// $('#control').modal('show');

//make sure the modal is centered on all devices
$("#control").modal('show').css({
'margin-left': function () { //Horizontal centering
var offset = "auto";
if ($(window).width() < 768) {
offset = 0;
if (($(window).width() / 2 - 210) > 0) offset = ($(window).width() / 2 - 210);
}
return offset;
}
});
$( '.modal-backdrop').click(function(){
$("#control").modal('hide');
});


var modal_state = json_store.objects[entity].state;
$('#control').find('.object-title').html(name + " - <span class='object-state'>" + json_store.objects[entity].state + "</span>");
$('#control').find('.control-dialog').attr("entity", entity);
Expand Down Expand Up @@ -2879,17 +2897,17 @@ var create_state_modal = function(entity) {
var add_schedule = function(index,cron,label,state_sets) {
if (cron === null) return;
if (label == undefined) label = index;
var sched_label_html = "<div class='col-md-3 sched_label' value='"+cron+"'><input type='text' class='form-control sched"+index+"label' id='"+index+"' value='"+label+"'></div>"
var sched_label_html = "<div class='col-xs-3 sched_label' value='"+cron+"'><input type='text' class='form-control sched"+index+"label' id='"+index+"' value='"+label+"'></div>"
if (state_sets[0] !== null) {
var display_label = label
if (display_label.length > 7) display_label = display_label.substring(0,6)+"..";
sched_label_html = "<div class='col-md-3 sched_label dropdown'><button type='button' class='btn btn-default btn-list-dropdown dropdown-toggle sched_dropdown sched"+index+"label' id='"+index+"' value='"+label+"' style='width: 100%;' data-target='#' data-toggle='dropdown'>"+display_label+"</button><ul class='dropdown-menu sched-dropdown-menu'>";
sched_label_html = "<div class='col-xs-3 sched_label dropdown'><button type='button' class='btn btn-default btn-list-dropdown dropdown-toggle sched_dropdown sched"+index+"label' id='"+index+"' value='"+label+"' style='width: 100%;' data-target='#' data-toggle='dropdown'>"+display_label+"</button><ul class='dropdown-menu sched-dropdown-menu'>";
for (var i = 0; i < state_sets.length; i++){
sched_label_html += "<li><a href='javascript: void(0)'id='"+index+"'>"+state_sets[i]+"</a></li>";
}
sched_label_html += "</ul></div>";
}
var sched_row_html = "<div class='row schedule_row schedule"+index+"entry'>"+sched_label_html+"<div id='"+index+"' class='schedule"+index+" sched_cron col-md-8 cron-data'></div><div class='sched_rmbutton col-md-1 sched"+index+"button'><button type='button' id='schedule"+index+"' class='pull-left btn btn-danger btn-xs schedrm'><i class='fa fa-minus'></i></button></div></div>"
var sched_row_html = "<div class='row schedule_row schedule"+index+"entry'>"+sched_label_html+"<div id='"+index+"' class='schedule"+index+" sched_cron col-xs-8 cron-data'></div><div class='sched_rmbutton col-xs-1 sched"+index+"button'><button type='button' id='schedule"+index+"' class='pull-left btn btn-danger btn-xs schedrm'><i class='fa fa-minus'></i></button></div></div>"
$('#control').find('.sched_control').append("<div class='cron_entry' id='"+index+"' value='"+cron+"'><span style='display:none' id='"+index+"' label='"+label+"' class='mhsched schedule"+index+"value'></span></div>");
$('#control').find('.sched_control').append(sched_row_html);

Expand Down Expand Up @@ -3196,7 +3214,23 @@ $(document).ready(function() {
}
//
var entity = $("#toolButton").attr('entity');
$('#optionsModal').modal('show');
// $('#optionsModal').modal('show');

$("#optionsModal").modal('show').css({
'margin-left': function () { //Horizontal centering
var offset = "auto";
if ($(window).width() < 768) {
offset = 0;
if (($(window).width() / 2 - 210) > 0) offset = ($(window).width() / 2 - 210);
}
return offset;
}
});

$( '.modal-backdrop').click(function(){
$("#optionsModal").modal('hide');
});

$('#optionsModal').find('.object-title').html("Mr.House Options");
$('#optionsModal').find('.options-dialog').attr("entity", "options");

Expand Down
1 change: 1 addition & 0 deletions web/ia7/include/weather-icons-wind.2.0.10.min.css

Large diffs are not rendered by default.

Loading

0 comments on commit e27e2b4

Please sign in to comment.