git-svn-id: https://msi/svn/firstRepo/WebClient/branches/NewRelease@33 0f545695-f87b-41b6-9a03-7f16563b5454
This commit is contained in:
@@ -6,6 +6,7 @@ define(['jquery', 'underscore', 'backbone','text!modules/search/searchViewTempla
|
||||
template:_.template(searchViewTemplate),
|
||||
|
||||
initialize: function (options) {
|
||||
this.id = "SearchView";
|
||||
var self = this;
|
||||
SearchView.__super__.initialize.call(this);
|
||||
this.collection = options.collection;
|
||||
@@ -29,17 +30,40 @@ define(['jquery', 'underscore', 'backbone','text!modules/search/searchViewTempla
|
||||
}
|
||||
Backbone.history.navigate('search/' + nResult + "/"+ categoria + "/" + diffi + "/" + titolo, { trigger: true });
|
||||
},
|
||||
|
||||
onShowed: function(){
|
||||
var stars = $('input[type=radio].star');
|
||||
if (stars.length > 0)
|
||||
{
|
||||
stars.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);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
//render the content into div of view
|
||||
render: function () {
|
||||
//this.header.title = "pippo";
|
||||
if (this.created === true)
|
||||
{
|
||||
SearchView.__super__.render.call(this);
|
||||
this.$el.append(this.header.$el);
|
||||
this.$el.append(this.template({data:this.collection.toJSON()}));
|
||||
this.$el.append(this.footer.$el);
|
||||
|
||||
this.$el.find('#nResult').val(Profile.data.risRic);
|
||||
this.trigger("renderCompleted:Search", this);
|
||||
|
||||
}
|
||||
this.$el.find('#nResult').val(Profile.data.risRic);
|
||||
this.trigger("renderCompleted:Search", this);
|
||||
this.$el.find("#searchBtn").addClass("ui-btn-active");
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user