Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
require.config({
baseUrl:'/js',
paths: {
jquery: 'libs/jquery/jquery-1.8.2.min',
underscore: 'libs/underscore/amd-js/underscore-min',
backbone: 'libs/backbone/amd-js/backbone-min',
validation: 'libs/backbone/amd-js/backbone-validation-amd-min',
serializeObject: 'serializeObject',
jqueryui: 'libs/jquery/jquery-ui-1.8.22.custom.min',
hbs: 'libs/require/hbs',
handlebars: 'libs/require/Handlebars',
i18nprecompile: 'libs/hbs/i18nprecompile',
json2: 'libs/hbs/json2',
text: 'libs/require/text',
domReady: 'libs/require/domReady',
order: 'libs/require/order',
cs: 'libs/require/cs'
},
hbs : {
templateExtension : 'html',
disableI18n : false
}
});
require(['jquery', 'domReady'], function($ ,domReady) {
domReady(function() {
var returnPage;
$('body *').mouseover(function() {
$(this).addClass('hover');
});
$('body *').mouseout(function() {
$(this).removeClass('hover');
});
$('.tf, .ta').focusin(function() {
var me;
me = this;
$(this).addClass('edit');
setTimeout(function() {
$(me).select();
}, 130);
});
$('.tf, .ta').focusout(function() {
var me;
me = this;
$(this).removeClass('edit');
$(this).addClass('save');
setTimeout(function() {
$(me).removeClass('save');
}, 1000);
});
$('table .tf').focusin(function() {
$(this).css({
width: (parseInt($(this).parent().css('width')) - 35) + 'px'
});
});
$('table .tf').focusout(function() {
$(this).css({
width: '100%'
});
});
$('.listOpener').click(function() {
var list;
list = $(this).parent().find('.clickList');
if (list.hasClass('open')) {
list.removeClass('open').slideUp('fast');
} else {
list.addClass('open').slideDown('fast');
}
});
$('.clickList').parent().mouseleave(function() {
$(this).find('.clickList').removeClass('open').slideUp('fast');
});
returnPage = 0;
({
editPage: function(edit) {
if (edit) {
returnPage = $('html, body').scrollTop();
return $('.pages').animate({
left: -parseInt($('.page').css('width'))
}, 'fast', function() {
return $('html, body').scrollTop(0);
});
} else {
$('html, body').scrollTop(returnPage);
return $('.pages').animate({
left: 0
}, 'fast');
}
}
});
$('ul.framedList li header h4').click(function() {
console.log(' Click ');
if ($(this).parent().parent().hasClass('open')) {
$(this).parent().parent().removeClass('open').find('.framedListContent').slideUp('fast');
} else {
$(this).parent().parent().addClass('open').find('.framedListContent').slideDown('fast');
}
});
$('table.selectable tr').click(function() {
if ($(this).hasClass('selected')) {
$(this).removeClass('selected');
} else {
$(this).addClass('selected');
}
});
$('ul.framedList li ul li').click(function() {
$('#floorId').text($(this).parent().parent().find('h4').text());
$('#roomId').attr('value', $(this).find('label').text());
editPage(true);
});
$('.resetPage').click(function() {
editPage(false);
});
})
});
require(['cs!app'], function(App) {
console.log('Starting application');
App.initialize();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.