Commit 94ec1592 authored by Evren Kutar's avatar Evren Kutar

v0.0.3.1 linkedmodel modal model_name fix

parent b4c9e7f7
......@@ -10,12 +10,12 @@
Hepsini Seç
</label>
</th>
<th ng-repeat="(key,value) in objects[0].data">{{ key }}</th>
<th ng-repeat="(key,value) in nobjects[0].data">{{ key }}</th>
<th>action</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="object in objects">
<tr ng-repeat="object in nobjects">
<td width="60">
<label>
<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">
......
......@@ -70,14 +70,14 @@ form_generator.factory('Generator', function ($http, $q, $log, $location, $modal
if (k.type == 'model') {
var formitem = scope.form[scope.form.indexOf(v)];
debugger;
var modelscope = {"url": scope.url, "form_params": {model: k.model_name}};
debugger;
formitem = {
"type": "template",
"templateUrl": "shared/templates/foreignKey.html",
"title": k.title,
"titleMap": generator.get_list(modelscope).then(function (res) {
type: "template",
templateUrl: "shared/templates/foreignKey.html",
title: k.title,
model_name: k.model_name,
titleMap: generator.get_list(modelscope).then(function (res) {
formitem.titleMap = [];
angular.forEach(res.data.objects, function (item) {
formitem.titleMap.push({
......@@ -318,9 +318,10 @@ form_generator.directive('addModalForLinkedModel', function ($modal, Generator)
size: 'lg',
resolve: {
items: function () {
debugger;
return Generator.get_form({
url: 'crud',
form_params: {'model': scope.form.title, "cmd": "add"}
form_params: {'model': scope.form.model_name, "cmd": "add"}
});
}
}
......
This diff is collapsed.
......@@ -50,12 +50,12 @@ angular.module("components/crud/templates/list.html", []).run(["$templateCache",
" Hepsini Seç\n" +
" </label>\n" +
" </th>\n" +
" <th ng-repeat=\"(key,value) in objects[0].data\">{{ key }}</th>\n" +
" <th ng-repeat=\"(key,value) in nobjects[0].data\">{{ key }}</th>\n" +
" <th>action</th>\n" +
" </tr>\n" +
" </thead>\n" +
" <tbody>\n" +
" <tr ng-repeat=\"object in objects\">\n" +
" <tr ng-repeat=\"object in nobjects\">\n" +
" <td width=\"60\">\n" +
" <label>\n" +
" <input type=\"checkbox\" style=\"zoom:1.5; margin:5px 0 0 8px;\">\n" +
......
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