Commit 98fb6cad authored by Evren Kutar's avatar Evren Kutar

Merge branch 'feature/issue-5138' into develop

parents 9e02d626 ae0ad443
......@@ -20,7 +20,7 @@
* @requires ulakbus.formService
* @type {ng.$compileProvider|*}
*/
angular.module('ulakbus.crud', ['schemaForm', 'ulakbus.formService'])
angular.module('ulakbus.crud', ['schemaForm', 'ui.bootstrap', 'ulakbus.formService'])
.config(function (sfErrorMessageProvider) {
sfErrorMessageProvider.setDefaultMessage(302, 'Bu alan zorunludur.');
sfErrorMessageProvider.setDefaultMessage(200, 'En az {{schema.minLength}} değer giriniz.');
......@@ -200,6 +200,17 @@ angular.module('ulakbus.crud', ['schemaForm', 'ulakbus.formService'])
return new Array(num);
};
// inline edit fields
$scope.datepickerstatuses = {};
$scope.inline_datepicker_status = function (field) {
return ($scope.datepickerstatuses[field] || false);
};
$scope.openDatepicker = function (field) {
$scope.datepickerstatuses[field] = true;
};
$scope.createListObjects = function () {
if ($scope.object.constructor === Array) {
$log.debug('new type show object')
......
<input type="text"
class="form-control"
ng-if="node.schema.properties[k].type === 'date'"
ng-model="node.model[outerIndex][k]"
uib-datepicker-popup="dd.MM.yyyy"
is-open="datepickerstatuses[outerIndex]"
close-text="Kapat"
current-text="Bugün"
clear-text="Temizle"
ng-click="openDatepicker(outerIndex)">
<select ng-model="node.model[outerIndex][k]"
ng-if="node.schema.properties[k].type === 'select'"
class="form-control"
name="selectinline{{outerIndex}}">
<option ng-repeat="item in node.schema.properties[k].titleMap" value="{{item.value}}">{{item.name}}</option>
</select>
<input type="{{node.schema.properties[k].type}}"
class="form-control"
ng-if="node.schema.properties[k].type !== 'date' && node.schema.properties[k].type !== 'select'"
ng-model="node.model[outerIndex][k]"
ng-change="nodeModelChange(this)">
\ No newline at end of file
......@@ -34,8 +34,8 @@
<td ng-repeat="field in object.fields track by $index">
<a role="button" ng-if="field.type==='link'"
ng-click="do_action(object.key, field)" ng-bind-html="field.content | markdown"></a>
<span ng-if="field.type==='str'" ng-bind-html="field.content | markdown"></span>
ng-click="do_action(object.key, field)" ng-bind-html="field.content || '' | markdown"></a>
<span ng-if="field.type==='str'" ng-bind-html="field.content || '' | markdown"></span>
</td>
<td>
......
......@@ -56,10 +56,12 @@
ng-init="innerIndex=$index"
ng-if="k!=='idx' && node.schema.properties[k]">
<span ng-if="!node.schema.inline_edit || node.schema.inline_edit.indexOf(k) < 0">{{ v.unicode || v }}</span>
<input type="{{node.schema.properties[k].type}}"
ng-if="node.schema.inline_edit.indexOf(k) > -1"
ng-model="node.model[outerIndex][k]"
ng-change="nodeModelChange(this)">
<!--<input type="{{node.schema.properties[k].type}}"-->
<!--ng-if="node.schema.inline_edit.indexOf(k) > -1"-->
<!--ng-model="node.model[outerIndex][k]"-->
<!--ng-change="nodeModelChange(this)">-->
<ng-include src="'components/crud/templates/inline_edit.html'"
ng-if="node.schema.inline_edit.indexOf(k) > -1"></ng-include>
</td>
<td ng-if="meta.allow_actions!==false">
<div ng-hide="meta.object_actions.length > 0">
......
......@@ -82,7 +82,7 @@
<!--<script src="bower_components/angular-resource/angular-resource.min.js"></script>-->
<!--<script src="bower_components/angular-bootstrap/ui-bootstrap.min.js"></script>-->
<script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
<script src="bower_components/showdown/dist/showdown.min.js"></script>
<script src="bower_components/showdown/dist/showdown.js"></script>
<script src="bower_components/angular-markdown-filter/markdown.js"></script>
<script src="bower_components/angular-sanitize/angular-sanitize.min.js"></script>
<script src="bower_components/tv4/tv4.js"></script>
......
......@@ -90,7 +90,7 @@
<!--<script src="bower_components/angular-resource/angular-resource.min.js"></script>-->
<!--<script src="bower_components/angular-bootstrap/ui-bootstrap.min.js"></script>-->
<script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
<script src="bower_components/showdown/dist/showdown.min.js"></script>
<script src="bower_components/showdown/dist/showdown.js"></script>
<script src="bower_components/angular-markdown-filter/markdown.js"></script>
<script src="bower_components/angular-sanitize/angular-sanitize.min.js"></script>
<script src="bower_components/tv4/tv4.js"></script>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
angular.module('templates-prod', ['components/auth/login.html', 'components/crud/templates/crud.html', 'components/crud/templates/filter.html', 'components/crud/templates/form.html', 'components/crud/templates/list.html', 'components/crud/templates/nodeTable.html', 'components/crud/templates/show.html', 'components/dashboard/dashboard.html', 'components/dashboard/user-info.html', 'components/dashboard/user-templates/staff.html', 'components/dashboard/user-templates/student.html', 'components/debug/debug.html', 'components/devSettings/devSettings.html', 'components/error_pages/404.html', 'components/error_pages/500.html', 'components/uitemplates/404.html', 'components/uitemplates/500.html', 'shared/templates/actionsModalContent.html', 'shared/templates/add.html', 'shared/templates/datefield.html', 'shared/templates/directives/alert.html', 'shared/templates/directives/chat.html', 'shared/templates/directives/guide-help.html', 'shared/templates/directives/header-breadcrumb.html', 'shared/templates/directives/header-notification.html', 'shared/templates/directives/header-sub-menu.html', 'shared/templates/directives/menuCollapse.html', 'shared/templates/directives/msgbox.html', 'shared/templates/directives/notifications.html', 'shared/templates/directives/right-sidebar.html', 'shared/templates/directives/search.html', 'shared/templates/directives/selected-user.html', 'shared/templates/directives/selectedUserPopover.html', 'shared/templates/directives/sidebar-notification.html', 'shared/templates/directives/sidebar-search.html', 'shared/templates/directives/sidebar.html', 'shared/templates/directives/sort.html', 'shared/templates/directives/stats.html', 'shared/templates/directives/timeline.html', 'shared/templates/fieldset.html', 'shared/templates/filefield.html', 'shared/templates/foreignKey.html', 'shared/templates/linkedModelModalContent.html', 'shared/templates/listnodeModalContent.html', 'shared/templates/modalContent.html', 'shared/templates/multiselect.html', 'shared/templates/select.html', 'shared/templates/translate.html', 'shared/templates/typeahead.html']);
angular.module('templates-prod', ['components/auth/login.html', 'components/crud/templates/crud.html', 'components/crud/templates/filter.html', 'components/crud/templates/form.html', 'components/crud/templates/inline_edit.html', 'components/crud/templates/list.html', 'components/crud/templates/nodeTable.html', 'components/crud/templates/show.html', 'components/dashboard/dashboard.html', 'components/dashboard/user-info.html', 'components/dashboard/user-templates/staff.html', 'components/dashboard/user-templates/student.html', 'components/debug/debug.html', 'components/devSettings/devSettings.html', 'components/error_pages/404.html', 'components/error_pages/500.html', 'components/uitemplates/404.html', 'components/uitemplates/500.html', 'shared/templates/actionsModalContent.html', 'shared/templates/add.html', 'shared/templates/datefield.html', 'shared/templates/directives/alert.html', 'shared/templates/directives/chat.html', 'shared/templates/directives/guide-help.html', 'shared/templates/directives/header-breadcrumb.html', 'shared/templates/directives/header-notification.html', 'shared/templates/directives/header-sub-menu.html', 'shared/templates/directives/menuCollapse.html', 'shared/templates/directives/msgbox.html', 'shared/templates/directives/notifications.html', 'shared/templates/directives/right-sidebar.html', 'shared/templates/directives/search.html', 'shared/templates/directives/selected-user.html', 'shared/templates/directives/selectedUserPopover.html', 'shared/templates/directives/sidebar-notification.html', 'shared/templates/directives/sidebar-search.html', 'shared/templates/directives/sidebar.html', 'shared/templates/directives/sort.html', 'shared/templates/directives/stats.html', 'shared/templates/directives/timeline.html', 'shared/templates/fieldset.html', 'shared/templates/filefield.html', 'shared/templates/foreignKey.html', 'shared/templates/linkedModelModalContent.html', 'shared/templates/listnodeModalContent.html', 'shared/templates/modalContent.html', 'shared/templates/multiselect.html', 'shared/templates/select.html', 'shared/templates/translate.html', 'shared/templates/typeahead.html']);
angular.module("components/auth/login.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("components/auth/login.html",
......@@ -169,6 +169,24 @@ angular.module("components/crud/templates/form.html", []).run(["$templateCache",
"</div>");
}]);
angular.module("components/crud/templates/inline_edit.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("components/crud/templates/inline_edit.html",
"<input type=\"text\"\n" +
" ng-if=\"node.schema.properties[k].type === 'date'\"\n" +
" ng-model=\"node.model[outerIndex][k]\"\n" +
" uib-datepicker-popup=\"{{node.model[outerIndex][k]}}\"\n" +
" is-open=\"datepickerstatuses[outerIndex]\"\n" +
" close-text=\"Kapat\"\n" +
" current-text=\"Bugün\"\n" +
" clear-text=\"Temizle\"\n" +
" ng-click=\"openDatepicker(outerIndex)\">\n" +
"\n" +
"<input type=\"{{node.schema.properties[k].type}}\"\n" +
" ng-if=\"node.schema.properties[k].type !== 'date'\"\n" +
" ng-model=\"node.model[outerIndex][k]\"\n" +
" ng-change=\"nodeModelChange(this)\">");
}]);
angular.module("components/crud/templates/list.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("components/crud/templates/list.html",
"<div class=\"starter-template\">\n" +
......@@ -207,8 +225,8 @@ angular.module("components/crud/templates/list.html", []).run(["$templateCache",
"\n" +
" <td ng-repeat=\"field in object.fields track by $index\">\n" +
" <a role=\"button\" ng-if=\"field.type==='link'\"\n" +
" ng-click=\"do_action(object.key, field)\" ng-bind-html=\"field.content | markdown\"></a>\n" +
" <span ng-if=\"field.type==='str'\" ng-bind-html=\"field.content | markdown\"></span>\n" +
" ng-click=\"do_action(object.key, field)\" ng-bind-html=\"field.content || '' | markdown\"></a>\n" +
" <span ng-if=\"field.type==='str'\" ng-bind-html=\"field.content || '' | markdown\"></span>\n" +
" </td>\n" +
"\n" +
" <td>\n" +
......@@ -307,10 +325,12 @@ angular.module("components/crud/templates/nodeTable.html", []).run(["$templateCa
" ng-init=\"innerIndex=$index\"\n" +
" ng-if=\"k!=='idx' && node.schema.properties[k]\">\n" +
" <span ng-if=\"!node.schema.inline_edit || node.schema.inline_edit.indexOf(k) < 0\">{{ v.unicode || v }}</span>\n" +
" <input type=\"{{node.schema.properties[k].type}}\"\n" +
" ng-if=\"node.schema.inline_edit.indexOf(k) > -1\"\n" +
" ng-model=\"node.model[outerIndex][k]\"\n" +
" ng-change=\"nodeModelChange(this)\">\n" +
" <!--<input type=\"{{node.schema.properties[k].type}}\"-->\n" +
" <!--ng-if=\"node.schema.inline_edit.indexOf(k) > -1\"-->\n" +
" <!--ng-model=\"node.model[outerIndex][k]\"-->\n" +
" <!--ng-change=\"nodeModelChange(this)\">-->\n" +
" <ng-include src=\"'components/crud/templates/inline_edit.html'\"\n" +
" ng-if=\"node.schema.inline_edit.indexOf(k) > -1\"></ng-include>\n" +
" </td>\n" +
" <td ng-if=\"meta.allow_actions!==false\">\n" +
" <div ng-hide=\"meta.object_actions.length > 0\">\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