git-svn-id: https://msi/svn/firstRepo/Management/trunk@26 0f545695-f87b-41b6-9a03-7f16563b5454

This commit is contained in:
2015-01-25 13:59:14 +00:00
parent a3e66c67a7
commit 314498ccdc
75 changed files with 197 additions and 1726 deletions
+33 -4
View File
@@ -116,7 +116,36 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/editricetta/editricett
valueMember: "category_id"
});
$("#titolo").jqxInput({placeHolder: "Titolo:", width: '350px', height: 25});
$("#autore").jqxInput({placeHolder: "Autore:", width: '350px', height: 25});
$("#autore").jqxInput({
placeHolder: "Autore:", width: '350px', height: 25,
source: function (query, response) {
var dataAdapter = new $.jqx.dataAdapter
(
{
datatype: "jsonp",
datafields: [
{name: 'autore'}
],
url: myManifest.Settings.DefaultURL + "/api/ricette/authors/" + query,
data: {
}
},
{
autoBind: true,
loadComplete: function (data) {
if (data.length > 0) {
response($.map(data, function (item) {
return {
label: item.autore,
value: item.autore
};
}));
}
}
}
);
}
});
$("#lvlDiff").jqxRating({width: 350, height: 35, theme: 'classic'});
$("#linkFonte").jqxInput({placeHolder: "Link Fonte:", width: '350px', height: 25});
$("#linkYouTube").jqxInput({placeHolder: "Link Youtube:", width: '350px', height: 25});
@@ -194,11 +223,11 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/editricetta/editricett
var div = '';
if (datarecord.id_tipo_ingredienti === "22")
{
div = '<div><b>' + datarecord.nome_ingrediente + '</b>: <i>' + datarecord.note + '</i></div>';
div = '<div><b>' + datarecord.nome_ingrediente + '</b>: <i>' + unescape(datarecord.note) + '</i></div>';
}
else
{
div = '<div><b>' + datarecord.nome_ingrediente + '</b>: ' + datarecord.quantita + ' ' + datarecord.unita + ' <i>' + datarecord.note + '</i></div>';
div = '<div><b>' + datarecord.nome_ingrediente + '</b>: ' + datarecord.quantita + ' ' + datarecord.unita + ' <i>' + unescape(datarecord.note) + '</i></div>';
}
return div;
}
@@ -273,7 +302,7 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/editricetta/editricett
"ingrediente_id": val.id_tipo_ingredienti,
"quantita": val.quantita,
"tipo_quantita_id": val.id_tipo_quantita,
"note": val.note
"note": escape(val.note)
};
sendobj.ingredienti.push(newItem);
});
+19 -4
View File
@@ -88,23 +88,38 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/ricette/ricetteViewTem
filterable: true,
autoshowfiltericon: true,
columns: [
{text: 'Titolo', dataField: 'titolo', width: "58%",
{text: 'Titolo', dataField: 'titolo', width: "50%",
cellsrenderer: function(row, columnfield, value, defaulthtml, columnproperties) {
return "<div style='overflow: hidden; text-overflow: ellipsis; padding-bottom: 2px; text-align: left; margin-right: 2px; margin-left: 4px; margin-top: 4px;'>" + unescape(value ) + "</div>";
}
},
{text: 'Autore', dataField: 'autore', width: "34%",
{text: 'Autore', dataField: 'autore', width: "30%",
cellsrenderer: function(row, columnfield, value, defaulthtml, columnproperties) {
return "<div style='overflow: hidden; text-overflow: ellipsis; padding-bottom: 2px; text-align: left; margin-right: 2px; margin-left: 4px; margin-top: 4px;'>" + unescape(value ) + "</div>";
}
},
{text: '', datafield: 'Edit', columntype: 'button', width: '7%',
{text: '', datafield: 'Edit', columntype: 'button', width: '10%',
cellsrenderer: function() {
return "Edit";
return "Modifica";
},
buttonclick: function(row) {
self.openRicetta(row);
}
},
{text: '', datafield: 'Del', columntype: 'button', width: '10%',
cellsrenderer: function() {
return "Elimina";
},
buttonclick: function(row) {
$.ajax({
url: myManifest.Settings.DefaultURL + "/backend/ricetta/" + row.id,
//dataType: "json",
type: 'DELETE'
}).then(function (response) {
var msg = response;
alert(msg.message);
});
}
}
]
});