More consistent button behaviour

This commit is contained in:
peteruithoven 2014-01-17 12:51:27 +01:00
parent bc4426faba
commit 8b229c0aff
3 changed files with 8 additions and 19 deletions

View File

@ -177,18 +177,16 @@ function initButtonBehavior() {
enableButton(btnSettings, openSettingsWindow); enableButton(btnSettings, openSettingsWindow);
// 29-okt-2013 - we're not doing help for smartphones at the moment // 29-okt-2013 - we're not doing help for smartphones at the moment
if (clientInfo.isSmartphone) { if (clientInfo.isSmartphone) {
btnInfo.addClass("disabled"); btnInfo.addClass("disabled");
} else { } else {
btnInfo.mouseup(function(e) { function onBtnInfo(e) {
e.preventDefault(); helpTours.startTour(helpTours.WELCOMETOUR);
console.log("btnInfo mouse up"); }
helpTours.startTour(helpTours.WELCOMETOUR); enableButton(btnInfo, onBtnInfo);
});
} }
} }
function stopPrint() { function stopPrint() {

View File

@ -131,14 +131,14 @@ function disableDragging() {
function enableButton(elem, handler) { function enableButton(elem, handler) {
//var elem = $('#'+domId); //var elem = $('#'+domId);
elem.removeClass("disabled"); elem.removeClass("disabled");
elem.unbind('click'); elem.unbind('onButtonClick');
elem.bind('click', handler); elem.bind('onButtonClick', handler);
} }
function disableButton(elem) { function disableButton(elem) {
//var elem = $('#'+domId); //var elem = $('#'+domId);
elem.addClass("disabled"); elem.addClass("disabled");
elem.unbind('click'); elem.unbind('onButtonClick');
} }
function showOrHideThermo() { function showOrHideThermo() {

View File

@ -146,15 +146,6 @@
} }
} }
/*#btnAddOpen {
position: absolute;
top: 370px;
left: 60px;
z-index: 1000;
width: 200%;
display: none;
}*/
.buttonGroup { .buttonGroup {
/*background-color: white;*/ /*background-color: white;*/
background-color: #fff; background-color: #fff;