Skip to content

Commit

Permalink
- Added event popups ignore list (issue genielabs#46)
Browse files Browse the repository at this point in the history
- Fixed some bugs in js/api web service calls (introduced with r474 js/api refactoring)
- Improved Media Renderer widget
- Fixed some bugs in UPnP MIG interface (not disposing objects when disabled; not setting device type to MediaTransmitter for media browser nodes)
- Removed all System.Windows.Forms and System.Drawing references from UPnP library (hopefully making it more stable)
(sf.net r475)
  • Loading branch information
genemars committed Feb 2, 2015
1 parent 6c62d00 commit 06507c3
Show file tree
Hide file tree
Showing 31 changed files with 302 additions and 156 deletions.
6 changes: 6 additions & 0 deletions BaseFiles/Common/Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4431,6 +4431,12 @@
<None Include="html\pages\control\widgets\homegenie\generic\images\wu_tstorms.gif">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="html\pages\control\widgets\homegenie\generic\images\media_unmute.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="html\images\halt.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Compile Include="dummy.cs" />
Expand Down
Binary file modified BaseFiles/Common/homegenie_factory_config.zip
Binary file not shown.
16 changes: 16 additions & 0 deletions BaseFiles/Common/html/css/my.css
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ body, a, label, input, option, textarea, span, div, p, h1, h2, h3, h4, h5, h6 {
max-width: 600px;
}

.hg-label {
overflow:hidden;
text-overflow:ellipsis;
}

.hg-program-options-scroll {
border: solid 1px gray;
padding: 5px;
Expand Down Expand Up @@ -376,6 +381,17 @@ div.ui-page-theme-a div.ui-body-inherit span.hg-indicator-door, div.ui-bar-inher
background: url("../images/indicators/door.png") no-repeat scroll 0 6px transparent;
}

.ui-slider-track.ui-mini {
height: 12px;
top: 8px;
margin: 0px 15px 0px 68px; /* add this line to file */
}
div.ui-slider-switch.ui-mini {
height: 29px;
top: 0;
margin: .5em 0; /* add this line */
}


.ui-li-has-thumb .ui-btn {
min-height: 18px !important;
Expand Down
Binary file added BaseFiles/Common/html/images/halt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 32 additions & 3 deletions BaseFiles/Common/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,36 @@ <h1>#{title}</h1>
<p>#{text}</p>
</div>
</div>
<!-- Global Popups -->

<!-- BEGIN Global Popups -->

<!-- Event Popup Settings -->
<div id="configure_popupsettings_edit" class="ui-corner-all hg-popup-b" data-role="popup" data-theme="a" data-overlay-theme="b" data-position-to="window" data-transition="pop">
<div data-role="header" class="ui-corner-top">
<h1>Event popup filters</h1>
</div>
<div class="ui-content ui-corner-bottom" style="height:280px;max-height:280px;overflow-y:scroll;overflow-x:hidden;">

<ul data-role="listview" id="popupsettings_ignorelist">
<li data-role="list-divider">
<div class="ui-grid-a">
<div class="ui-block-a hg-label" style="width:75%">Domain</div>
<div class="ui-block-b hg-label" style="width:25%">Address</div>
</div>
</li>
</ul>

</div>
<div class="ui-grid-a ui-footer ui-bar-inherit" align="center">
<div class="ui-block-a">
<a class="ui-btn ui-corner-all ui-icon-delete ui-btn-icon-left" href="#" data-locale-id="configure_popupfilter_optclose" data-rel="back">Close</a>
</div>
</div>
</div>


<!-- Module Edit Popup -->
<div id="automation_group_module_edit" class="ui-corner-all hg-popup-a" data-role="popup" data-theme="a" data-overlay-theme="b" data-position-to="window">
<div id="automation_group_module_edit" class="ui-corner-all hg-popup-a" data-role="popup" data-theme="a" data-overlay-theme="b" data-position-to="window" data-transition="pop">
<a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-icon-delete ui-btn-icon-notext ui-btn-right">Close</a>
<div data-role="header" class="ui-corner-top">
<h1 id="module_title">Module Settings</h1>
Expand Down Expand Up @@ -340,7 +367,7 @@ <h1 id="module_title">Module Settings</h1>
</div>

<!-- Program Configuration Popup -->
<div id="automationprograms_program_options" class="ui-corner-all hg-popup-b" data-role="popup" data-theme="a" data-overlay-theme="b" data-position-to="window">
<div id="automationprograms_program_options" class="ui-corner-all hg-popup-b" data-role="popup" data-theme="a" data-overlay-theme="b" data-position-to="window" data-transition="pop">
<a href="#" class="ui-btn ui-corner-all ui-shadow ui-icon-delete ui-btn-icon-notext ui-btn-right" data-rel="back">Close</a>
<div class="ui-corner-top" data-role="header">
<h2 data-locale-id="configure_program_options">Options</h2>
Expand Down Expand Up @@ -373,5 +400,7 @@ <h4 id="automationprograms_program_title"></h4>
</div>
</div>

<!-- END Global Popups -->

</body>
</html>
9 changes: 8 additions & 1 deletion BaseFiles/Common/html/js/api/homegenie.automation.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ HG.Automation.Macro.Save = function (mode, callback) {
$.ajax({
url: '/' + HG.WebApp.Data.ServiceKey + '/' + HG.WebApp.Data.ServiceDomain + "/Automation/Macro.Save/" + mode + "/",
type: 'GET',
dataType: 'text',
success: function (data) {
callback(data);
}
Expand All @@ -59,6 +60,7 @@ HG.Automation.Macro.GetDelay = function (callback) {
$.ajax({
url: '/' + HG.WebApp.Data.ServiceKey + '/' + HG.WebApp.Data.ServiceDomain + "/Automation/Macro.GetDelay/",
type: 'GET',
dataType: 'text',
success: function (data) {
var value = eval(data)[0];
callback(value);
Expand All @@ -83,7 +85,7 @@ HG.Automation.Programs.AddProgram = function (group, program, callback) {
url: '/' + HG.WebApp.Data.ServiceKey + '/' + HG.WebApp.Data.ServiceDomain + '/Automation/Programs.Add/' + group + '/' + (new Date().getTime()),
type: 'POST',
data: program,
dataType: "text",
dataType: 'text',
success: function (data) {
var value = eval(data);
if (value == 'undefined') {
Expand Down Expand Up @@ -252,6 +254,7 @@ HG.Automation.Scheduling.Update = function (name, expression, pid, callback) {
$.ajax({
url: '/' + HG.WebApp.Data.ServiceKey + '/' + HG.WebApp.Data.ServiceDomain + '/Automation/Scheduling.Update/' + name + '/' + expression.replace(/\//g, '|') + '/' + pid,
type: 'GET',
dataType: 'text',
success: function (data) {
callback(data);
}
Expand All @@ -261,6 +264,7 @@ HG.Automation.Scheduling.Delete = function (name, callback) {
$.ajax({
url: '/' + HG.WebApp.Data.ServiceKey + '/' + HG.WebApp.Data.ServiceDomain + '/Automation/Scheduling.Delete/' + name,
type: 'GET',
dataType: 'text',
success: function (data) {
callback(data);
}
Expand All @@ -270,6 +274,7 @@ HG.Automation.Scheduling.Enable = function (name, callback) {
$.ajax({
url: '/' + HG.WebApp.Data.ServiceKey + '/' + HG.WebApp.Data.ServiceDomain + '/Automation/Scheduling.Enable/' + name,
type: 'GET',
dataType: 'text',
success: function (data) {
callback(data);
}
Expand All @@ -279,6 +284,7 @@ HG.Automation.Scheduling.Disable = function (name, callback) {
$.ajax({
url: '/' + HG.WebApp.Data.ServiceKey + '/' + HG.WebApp.Data.ServiceDomain + '/Automation/Scheduling.Disable/' + name,
type: 'GET',
dataType: 'text',
success: function (data) {
callback(data);
}
Expand All @@ -288,6 +294,7 @@ HG.Automation.Scheduling.List = function (callback) {
$.ajax({
url: '/' + HG.WebApp.Data.ServiceKey + '/' + HG.WebApp.Data.ServiceDomain + '/Automation/Scheduling.List/',
type: 'GET',
dataType: 'text',
success: function (data) {
callback(eval(arguments[2].responseText));
}
Expand Down
3 changes: 3 additions & 0 deletions BaseFiles/Common/html/js/api/homegenie.configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ HG.Configure.Interfaces.ServiceCall = function (ifacefn, callback) {
$.ajax({
url: '/' + HG.WebApp.Data.ServiceKey + '/' + HG.WebApp.Data.ServiceDomain + '/Config/Interfaces.Configure/' + ifacefn + '/',
type: 'GET',
dataType: 'text',
success: function (data) {
var value = eval(data);
if (typeof value == 'undefined') {
Expand Down Expand Up @@ -192,6 +193,7 @@ HG.Configure.Modules.Get = function (domain, address, callback) {
$.ajax({
url: '/' + HG.WebApp.Data.ServiceKey + '/' + HG.WebApp.Data.ServiceDomain + '/Config/Modules.Get/' + domain + "/" + address + "/" + (new Date().getTime()),
type: 'GET',
dataType: 'text',
success: function (data) {
if (typeof callback != 'undefined' && callback != null) callback(data);
}
Expand Down Expand Up @@ -224,6 +226,7 @@ HG.Configure.System.ServiceCall = function (systemfn, callback) {
$.ajax({
url: '/' + HG.WebApp.Data.ServiceKey + '/' + HG.WebApp.Data.ServiceDomain + '/Config/System.Configure/' + systemfn + '/',
type: 'GET',
dataType: 'text',
success: function (data) {
var value = eval(data);
if (typeof value == 'undefined') {
Expand Down
2 changes: 2 additions & 0 deletions BaseFiles/Common/html/js/api/homegenie.statistics.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ HG.Statistics.ServiceCall = function (fn, opt1, opt2, callback) {
$.ajax({
url: '/' + HG.WebApp.Data.ServiceKey + '/' + HG.WebApp.Data.ServiceDomain + '/Statistics/' + fn + '/' + opt1 + '/' + opt2,
type: 'GET',
dataType: 'text',
success: function (data) {
var value = eval(data);
if (typeof value == 'undefined') {
Expand All @@ -29,6 +30,7 @@ HG.Statistics.Global.GetWattsCounter = function (callback) {
$.ajax({
url: '/' + HG.WebApp.Data.ServiceKey + '/' + HG.WebApp.Data.ServiceDomain + '/Statistics/Global.CounterTotal/Meter.Watts',
type: 'GET',
dataType: 'text',
success: function (data) {
var counter = eval(data)[0];
callback(counter.ResponseValue);
Expand Down
6 changes: 6 additions & 0 deletions BaseFiles/Common/html/js/api/homegenie.system.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ HG.System.HasPassword = function (callback) {
$.ajax({
url: '/' + HG.WebApp.Data.ServiceKey + '/' + HG.WebApp.Data.ServiceDomain + '/Config/System.Configure/Security.HasPassword/' + (new Date().getTime()),
type: 'GET',
dataType: 'text',
success: function (data) {
var haspass = eval(data)[0];
if (callback != null) callback(haspass.ResponseValue);
Expand Down Expand Up @@ -63,6 +64,7 @@ HG.System.LoggingIsEnabled = function (callback) {
$.ajax({
url: '/' + HG.WebApp.Data.ServiceKey + '/' + HG.WebApp.Data.ServiceDomain + '/Config/System.Configure/SystemLogging.IsEnabled/' + (new Date().getTime()),
type: 'GET',
dataType: 'text',
success: function (data) {
var haslog = eval(data)[0];
if (callback != null) callback(haslog.ResponseValue);
Expand Down Expand Up @@ -93,6 +95,7 @@ HG.System.WebCacheIsEnabled = function (callback) {
$.ajax({
url: '/' + HG.WebApp.Data.ServiceKey + '/' + HG.WebApp.Data.ServiceDomain + '/Config/System.Configure/HttpService.GetWebCacheEnabled/' + (new Date().getTime()),
type: 'GET',
dataType: 'text',
success: function (data) {
var haslog = eval(data)[0];
if (callback != null) callback(haslog.ResponseValue);
Expand All @@ -106,6 +109,7 @@ HG.System.UpdateManager.UpdateCheck = function (callback) {
$.ajax({
url: '/' + HG.WebApp.Data.ServiceKey + '/' + HG.WebApp.Data.ServiceDomain + '/Config/System.Configure/UpdateManager.Check/' + (new Date().getTime()),
type: 'GET',
dataType: 'text',
success: function (data) {
if (callback != null) callback(data);
}
Expand All @@ -116,6 +120,7 @@ HG.System.UpdateManager.GetUpdateList = function (callback) {
$.ajax({
url: '/' + HG.WebApp.Data.ServiceKey + '/' + HG.WebApp.Data.ServiceDomain + '/Config/System.Configure/UpdateManager.UpdatesList/' + (new Date().getTime()),
type: 'GET',
dataType: 'text',
success: function (data) {
if (callback != null) callback(data);
}
Expand All @@ -126,6 +131,7 @@ HG.System.UpdateManager.DownloadUpdate = function (callback) {
$.ajax({
url: '/' + HG.WebApp.Data.ServiceKey + '/' + HG.WebApp.Data.ServiceDomain + '/Config/System.Configure/UpdateManager.DownloadUpdate/' + (new Date().getTime()),
type: 'GET',
dataType: 'text',
success: function (data) {
if (callback != null) callback(data);
}
Expand Down
10 changes: 7 additions & 3 deletions BaseFiles/Common/html/js/api/homegenie.webapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ HG.WebApp.InitializePage = function ()
//
// Application start - Init stuff
//
dataStore = $.jStorage; //new window.Basil({ namespace: 'HomeGenie', storages: ['local', 'session', 'cookie', 'memory'] });
dataStore = $.jStorage;
//
var theme = dataStore.get('UI.Theme');
if (theme == null || (theme < 'a' || theme > 'g')) {
Expand Down Expand Up @@ -313,7 +313,7 @@ HG.WebApp.InitializePage = function ()
this.ellipse(x, y, r - r / 5, r - r / 20).attr({ stroke: "none", fill: "r(.5,.1)#ccc-#ccc", opacity: 0 })
);
};

// Global Popups
$( "#automation_group_module_edit" ).enhanceWithin().popup();
$('#module_update_button').bind('click', function (event) {
HG.WebApp.GroupModules.CurrentModule.Name = HG.WebApp.GroupModules.EditModule.Name;
Expand All @@ -338,7 +338,11 @@ HG.WebApp.InitializePage = function ()
HG.WebApp.GroupsList.SaveGroups(null);
});
//
$( "#automationprograms_program_options" ).enhanceWithin().popup();
$('#automationprograms_program_options').enhanceWithin().popup();
$('#configure_popupsettings_edit').enhanceWithin().popup();
$('#configure_popupsettings_edit').on('popupbeforeposition', function(){
HG.WebApp.Events.PopupRefreshIgnore();
});

};

Expand Down
8 changes: 8 additions & 0 deletions BaseFiles/Common/html/pages/configure/maintenance/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,14 @@
</select>
</div>
</div>
<div class="ui-grid-a">
<div class="ui-block-a">
<label data-locale-id="configure_system_blockedpopups">Blocked popups</label><br />
</div>
<div class="ui-block-b" style="float:right;width:150px" align="right">
<a href="#configure_popupsettings_edit" data-rel="popup" class="ui-btn ui-corner-all">Edit</a>
</div>
</div>
</li>
</ul>

Expand Down
2 changes: 1 addition & 1 deletion BaseFiles/Common/html/pages/control/_control.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ HG.WebApp.Control.RenderModule = function () {
HG.WebApp.GroupModules.ShowModuleOptions(HG.WebApp.GroupModules.CurrentModule.Domain, HG.WebApp.GroupModules.CurrentModule.Address);
});
} catch (e) {
console.log('ERROR in Widget RenderView: ' + e);
console.log('Widget error: "' + e + '", Line ' + e.lineNumber + ', Column ' + e.columnNumber);
//alert(rendermodule.Module.Widget + " Widget RenderView Error:\n" + e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Version: "2013-03-31",

GroupName: '',
IconImage: 'pages/control/widgets/homegenie/generic/images/light_off.png',
IconImage: 'pages/control/widgets/homegenie/generic/images/icons/colorbulbs.png',
StatusText: '',
Description: '',
UpdateTime: '',
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,23 @@
<div class="ui-header ui-bar-inherit" style="padding-left:5px;padding-right:5px;font-weight:normal">
<div data-ui-field="name" style="display:block;font-weight:bold">Name</div>
<div data-ui-field="description" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">loading...</div>
<a data-ui-field="settings" data-role="button" data-icon="edit" data-iconshadow="false" data-direction="reverse" data-iconpos="notext" class="ui-btn-right">Options</a>
</div>
<br />
<div data-role="controlgroup" data-type="horizontal" align="center" data-mini="true">
<img class="ui-btn" data-ui-field="media_prev" height="32" src="pages/control/widgets/homegenie/generic/images/media_previous.png" />
<img class="ui-btn" data-ui-field="media_stop" height="32" src="pages/control/widgets/homegenie/generic/images/media_stop.png" />
<img class="ui-btn" data-ui-field="media_play" height="32" src="pages/control/widgets/homegenie/generic/images/media_play.png" />
<img class="ui-btn" data-ui-field="media_pause" height="32" src="pages/control/widgets/homegenie/generic/images/media_pause.png" style="display:none" />
<img class="ui-btn" data-ui-field="media_next" height="32" src="pages/control/widgets/homegenie/generic/images/media_next.png" />
</div>
<div style="margin-left:20px">
<img data-ui-field="media_mute" alt="Mute/Unmute" height="32" src="pages/control/widgets/homegenie/generic/images/media_mute.png" style="display:inline-block;vertical-align:middle;cursor:pointer" />
<span style="display:inline-block;vertical-align:middle">
&nbsp;Volume
</span>
</div>
<div style="margin-left:10px;">
<input data-ui-field="media_volume" data-mini="true" type="range" value="60" min="0" max="100">
</div>

<div class="ui-footer ui-bar-inherit hg-widget-footer" align="right">
<div data-ui-field="status" style="font-size:11pt;display: table-cell;">&nbsp;</div>
<div style="margin-right:20px;margin-top:-5px;padding-bottom:5px" align="right">
<span style="display:inline-block;vertical-align:middle">
volume
</span>&nbsp;
<img data-ui-field="media_mute" alt="Mute/Unmute" height="32" src="pages/control/widgets/homegenie/generic/images/media_mute.png" style="display:inline-block;vertical-align:middle;cursor:pointer" />
</div>
</div>
<!-- widget popups and other ui elements follow -->
<div data-ui-field="controlpopup" data-position-to="window" class="hg-popup-a" data-transition="pop" data-overlay-theme="b">
<a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-icon-delete ui-btn-icon-notext ui-btn-right">Close</a>
<div style="margin:10px">
<!-- BEGIN - COMMON UI PART --->
<table>
<tr>
<td>
<img data-ui-field="icon" height="56" src="pages/control/widgets/homegenie/generic/images/media.png" />
</td>
<td>
<div data-ui-field="group" style="margin:0;margin-left:10px;font-family:Georgia;font-size:11pt;color:gray">Group Name</div>
<h4 data-ui-field="name" style="margin:0;margin-left:10px;">Description</h4>
</td>
</tr>
</table>

<br />
</div>
</div>
Loading

0 comments on commit 06507c3

Please sign in to comment.