Commit edad2093 authored by Vladimir Baranov's avatar Vladimir Baranov

rref #5433. Fix key instead of unicode displaying in foreign key popoup, fix fields order

parent 45019b81
......@@ -515,6 +515,7 @@ angular.module('ulakbus.crud', ['schemaForm', 'ui.bootstrap', 'ulakbus.formServi
$scope.prepareTimetable = function prepareTimetable(timetable){
var grouped = groupBy(timetable, "saat");
for (var day in grouped){
if (!grouped.hasOwnProperty(day)) continue;
var dayItems = grouped[day];
grouped[day] = dayItems.sort(function(a, b){
return a.gun < b.gun ? -1 : 1;
......
......@@ -19,7 +19,7 @@
</label>
</th>
<th scope="row" style="text-align:center">#</th>
<th ng-repeat="propName in node.form" ng-init="prop = node.schema.properties[propName]">
<th ng-repeat="prop in node.schema.properties_list">
<span ng-if="!value.verbose_name">{{prop.title||prop.name}}</span>
</th>
<th ng-if="meta.allow_actions!==false">İşlem</th>
......@@ -42,14 +42,14 @@
</td>
</tr>
<tr ng-repeat="listnodemodel in node.items track by $index" ng-init="outerIndex=$index" ng-if="node.schema.formType=='ListNode'">
<tr ng-repeat="listnodemodel in node.items" ng-init="outerIndex=$index" ng-if="node.schema.formType=='ListNode'">
<td ng-if="meta.allow_selection===true" width="60">
<label>
<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">
</label>
</td>
<th scope="row" style="text-align:center">{{$index+1}}</th>
<td ng-repeat="propName in node.form" ng-init="k = propName; v = listnodemodel[propName]; inline = node.schema.inline_edit && node.schema.inline_edit.indexOf(k) > -1">
<td ng-repeat="prop in node.schema.properties_list" ng-init="k = prop.name; v = listnodemodel[k]; inline = node.schema.inline_edit && node.schema.inline_edit.indexOf(k) > -1">
<span ng-if="!inline">{{ v.unicode || v }}</span>
<!--<input type="{{node.schema.properties[k].type}}"-->
<!--ng-if="node.schema.inline_edit.indexOf(k) > -1"-->
......
This diff is collapsed.
......@@ -184,7 +184,7 @@ angular.module('ulakbus')
}
do_action(msg_data, msg_data.cmd);
if (msg_data.msg != "pong"){
$log.info("MESSAGE:", event, "Data:", msg_data);
$log.info("MESSAGE:", event, "Data:", angular.copy(msg_data));
}
};
wsOps.onError = function (evt) {
......
......@@ -49,4 +49,30 @@ angular.module("ulakbus")
}
}
}
/**
* @param collection {Array|Object} Array of objects to group
* @param callback {Function} Callback to apply to every element of the collection
* @returns None
*/
this.iterate = function(collection, callback){
angular.forEach(collection, function(val, key){
// don't iterate over angular binding indexes
if (key.indexOf && key.indexOf('$$') == 0){
return;
}
callback(val, key);
})
}
})
.filter("formatJson", function(){
return function(val){
try {
return JSON.stringify(val, null, 4);
} catch(e){
return val;
}
}
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment