1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- /**
- * Created by robin on 11/3/15.
- */
-
- (function () {
- 'use strict';
- angular.module('luticateUtils')
- .factory('luticateDialogErrorHelper', ['dialogs', function (dialogs) {
-
- var luticateDialogErrorHelper = {};
-
- luticateDialogErrorHelper.errorMessage = function(data)
- {
- var message = data.Data;
- message += " (HTTP code: " + data.Status + ")";
- /*var status = 'Common.Status.HttpStatus.' + data.status;
- var statusText = tr(status);
- if (status != statusText)
- message += " : " + statusText;*/
- return message;
- };
-
- luticateDialogErrorHelper.errorDialog = function(data)
- {
- var message = luticateDialogErrorHelper.errorMessage(data);
- return dialogs.create('/luticateUtils/dialogerror.html', 'luticateDialogError', {message: message, data: data}, {});
- };
-
- return luticateDialogErrorHelper;
- }]);
- })();
-
- angular.module("luticateUtils").run(["$templateCache", function($templateCache)
- {
- $templateCache.put("/luticateUtils/dialogerror.html", '<div class="popin modal-content" xmlns="http://www.w3.org/1999/html">' +
- ' <div class="modal-header">Error</div>' +
- ' <div class="modal-body">' +
- ' <div class="form-group">{{ message }}</div>' +
- ' <div class="clearfix"></div>' +
- ' </div>' +
- ' <div class="modal-footer">' +
- ' <button type="submit" class="btn btn-inverse" ng-click="$close()" ng-show="!showLogin">Close</button>' +
- ' <button type="submit" class="btn btn-inverse" ng-click="$close()" ng-show="showLogin">Cancel</button>' +
- ' <button type="button" class="btn btn-primary" ng-click="reconnect()" ng-show="showLogin">Login</button>' +
- ' </div>' +
- ' </div>')
- }]);
|