51 lines
1.7 KiB
JavaScript
51 lines
1.7 KiB
JavaScript
/*
|
|
* To change this license header, choose License Headers in Project Properties.
|
|
* To change this template file, choose Tools | Templates
|
|
* and open the template in the editor.
|
|
*/
|
|
/**
|
|
* Created by Denis on 19/06/2014.
|
|
*/
|
|
define(['jquery', 'backbone','libs/fastclick', 'jqm', 'jQueryPlugins'],
|
|
function($, Backbone, FastClick){
|
|
|
|
var Utility = {
|
|
retMe: function(){
|
|
return this;
|
|
},
|
|
changePage: function(view){
|
|
//append to dom
|
|
$('body').append(view.$el);
|
|
|
|
$.mobile.pageContainer.pagecontainer ("change", $(view.el), {changeHash:false});
|
|
|
|
FastClick.attach(document.body);
|
|
|
|
$(":jqmData(role='page'):last").on("pageshow", function (event) {
|
|
if (view.onShowed !== null)
|
|
view.onShowed();
|
|
});
|
|
|
|
$('input[type=radio].star').rating({
|
|
callback: function(value, link){
|
|
var tip = $('#hover-test');
|
|
if(value === undefined)
|
|
{
|
|
$('#hover-test').html("Nessuna" || 'value: ' );
|
|
}
|
|
else
|
|
$('#hover-test').html(link.title || 'value: ' + value);
|
|
},
|
|
focus: function(value, link){
|
|
var tip = $('#hover-test');
|
|
tip[0].data = tip[0].data || tip.html();
|
|
tip.html(link.title || 'value: ' + value);
|
|
}
|
|
});
|
|
}
|
|
};
|
|
|
|
return Utility.retMe();
|
|
});
|
|
|