Commit d8849d37 authored by Evren Kutar's avatar Evren Kutar

fix typeahead field

fix 401 login required error
parent bbea4aab
...@@ -22,10 +22,10 @@ angular.module('ulakbus.dashboard') ...@@ -22,10 +22,10 @@ angular.module('ulakbus.dashboard')
scope: {}, scope: {},
controller: function ($scope) { controller: function ($scope) {
$scope.task_list = [ $scope.task_list = [
{WFToken: "yfuialhfuial", title: "sample 1 workflow", description: "sample 1", wf_type: "type x"}, {WFToken: "yfuialhfuial", title: "sample 1 workflow", description: "sample 1", wf_type: "type x", date: '02.05.2016'},
{WFToken: "yfuialhfuial", title: "sample 2 workflow", description: "sample 2", wf_type: "type x"}, {WFToken: "yfuialhfuial", title: "sample 2 workflow", description: "sample 2", wf_type: "type x", date: '02.05.2016'},
{WFToken: "yfuialhfuial", title: "sample 3 workflow", description: "sample 3", wf_type: "type y"}, {WFToken: "yfuialhfuial", title: "sample 3 workflow", description: "sample 3", wf_type: "type y", date: '02.05.2016'},
{WFToken: "yfuialhfuial", title: "sample 4 workflow", description: "sample 4", wf_type: "type y"} {WFToken: "yfuialhfuial", title: "sample 4 workflow", description: "sample 4", wf_type: "type y", date: '02.05.2016'}
]; ];
var regroup_tasks = function () { var regroup_tasks = function () {
var grouped_tasks = {}; var grouped_tasks = {};
......
...@@ -19,10 +19,12 @@ ...@@ -19,10 +19,12 @@
<!--</ul>--> <!--</ul>-->
<!--</span>--> <!--</span>-->
<input type="text" <input type="text"
autocomplete="off"
ng-model="$$value$$" ng-model="$$value$$"
uib-typeahead="item.name for item in form.titleMap | filter:$viewValue" uib-typeahead="item as item.name for item in form.titleMap"
typeahead-wait-ms="500" typeahead-wait-ms="500"
typeahead-loading="loadingTitleMap" typeahead-loading="loadingTitleMap"
typeahead-on-select="form.onDropdownSelect($item, form.name)"
placeholder="{{form.title}}" placeholder="{{form.title}}"
ng-model-options="form.ngModelOptions" ng-model-options="form.ngModelOptions"
ng-disabled="form.readonly" ng-disabled="form.readonly"
......
...@@ -99,9 +99,10 @@ angular.module('ulakbus') ...@@ -99,9 +99,10 @@ angular.module('ulakbus')
$location.reload(); $location.reload();
}, },
"401": function () { "401": function () {
$location.path('/login');
if ($location.path() === "/login") { if ($location.path() === "/login") {
$log.debug("show errors on login form"); $log.debug("show errors on login form");
} else {
return window.location.reload();
} }
}, },
"403": function () { "403": function () {
......
...@@ -121,7 +121,7 @@ angular.module('ulakbus') ...@@ -121,7 +121,7 @@ angular.module('ulakbus')
} }
}, },
error: function () { error: function () {
ErrorService.handle(msg_data, 'ws'); return ErrorService.handle(msg_data, 'ws');
}, },
notification: function () { notification: function () {
$rootScope.$broadcast('notifications', msg_data["notifications"]); $rootScope.$broadcast('notifications', msg_data["notifications"]);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -442,13 +442,15 @@ angular.module("components/crud/templates/show.html", []).run(["$templateCache", ...@@ -442,13 +442,15 @@ angular.module("components/crud/templates/show.html", []).run(["$templateCache",
" </thead>\n" + " </thead>\n" +
" <tbody ng-if=\"obj.type==='table-multiRow'\">\n" + " <tbody ng-if=\"obj.type==='table-multiRow'\">\n" +
" <tr ng-repeat=\"row in obj.fields\">\n" + " <tr ng-repeat=\"row in obj.fields\">\n" +
" <td ng-repeat=\"(k,v) in row track by $index\"><markdown ng-bind-html=\"v\"></markdown></td>\n" + " <!--<td ng-repeat=\"(k,v) in row track by $index\"><markdown ng-bind-html=\"v\"></markdown></td>-->\n" +
" <td ng-repeat=\"(k,v) in row track by $index\" ng-bind-html=\"v | markdown\"></td>\n" +
" </tr>\n" + " </tr>\n" +
" </tbody>\n" + " </tbody>\n" +
" <tbody ng-if=\"obj.type==='table'\">\n" + " <tbody ng-if=\"obj.type==='table'\">\n" +
" <tr ng-repeat=\"(key, value) in obj.fields\">\n" + " <tr ng-repeat=\"(key, value) in obj.fields\">\n" +
" <td class=\"col-md-2\">{{key}}</td>\n" + " <td class=\"col-md-2\">{{key}}</td>\n" +
" <td class=\"col-md-8\"><markdown ng-bind-html=\"value\"></markdown></td>\n" + " <!--<td class=\"col-md-8\"><markdown ng-bind-html=\"value\"></markdown></td>-->\n" +
" <td class=\"col-md-8\" ng-bind-html=\"value | markdown\"></td>\n" +
" </tr>\n" + " </tr>\n" +
" </tbody>\n" + " </tbody>\n" +
" </table>\n" + " </table>\n" +
...@@ -2993,10 +2995,12 @@ angular.module("shared/templates/typeahead.html", []).run(["$templateCache", fun ...@@ -2993,10 +2995,12 @@ angular.module("shared/templates/typeahead.html", []).run(["$templateCache", fun
" <!--</ul>-->\n" + " <!--</ul>-->\n" +
" <!--</span>-->\n" + " <!--</span>-->\n" +
" <input type=\"text\"\n" + " <input type=\"text\"\n" +
" autocomplete=\"off\"\n" +
" ng-model=\"$$value$$\"\n" + " ng-model=\"$$value$$\"\n" +
" uib-typeahead=\"item.name for item in form.titleMap | filter:$viewValue\"\n" + " uib-typeahead=\"item as item.name for item in form.titleMap\"\n" +
" typeahead-wait-ms=\"500\"\n" + " typeahead-wait-ms=\"500\"\n" +
" typeahead-loading=\"loadingTitleMap\"\n" + " typeahead-loading=\"loadingTitleMap\"\n" +
" typeahead-on-select=\"form.onDropdownSelect($item, form.name)\"\n" +
" placeholder=\"{{form.title}}\"\n" + " placeholder=\"{{form.title}}\"\n" +
" ng-model-options=\"form.ngModelOptions\"\n" + " ng-model-options=\"form.ngModelOptions\"\n" +
" ng-disabled=\"form.readonly\"\n" + " ng-disabled=\"form.readonly\"\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