Commit c247db93 authored by Evren Kutar's avatar Evren Kutar

generate dist

parent 299442f6
...@@ -82,7 +82,7 @@ module.exports = function (grunt) { ...@@ -82,7 +82,7 @@ module.exports = function (grunt) {
{expand: true, cwd: 'app/styles/images/', src: '*', dest: 'dist/css/images/', flatten: true}, {expand: true, cwd: 'app/styles/images/', src: '*', dest: 'dist/css/images/', flatten: true},
{expand: true, cwd: 'app/bower_components/bootstrap/dist/fonts/', src: '*', dest: 'dist/fonts/', flatten: true, filter: 'isFile'}, {expand: true, cwd: 'app/bower_components/bootstrap/dist/fonts/', src: '*', dest: 'dist/fonts/', flatten: true, filter: 'isFile'},
{expand: true, cwd: 'app/bower_components/jquery/dist/', src: 'jquery.min.js', dest: 'dist/bower_components/', flatten: true, filter: 'isFile'}, {expand: true, cwd: 'app/bower_components/jquery/dist/', src: 'jquery.min.js', dest: 'dist/bower_components/', flatten: true, filter: 'isFile'},
{expand: true, cwd: 'app/bower_components/angular/', src: 'angular.min.js', dest: 'dist/bower_components/', flatten: true, filter: 'isFile'} {expand: true, cwd: 'app/bower_components/angular/', src: 'angular.js', dest: 'dist/bower_components/', flatten: true, filter: 'isFile'}
] ]
}, },
local_prod: { local_prod: {
...@@ -124,6 +124,7 @@ module.exports = function (grunt) { ...@@ -124,6 +124,7 @@ module.exports = function (grunt) {
"app/zetalib/interceptors.js", "app/zetalib/interceptors.js",
"app/zetalib/general.js", "app/zetalib/general.js",
"app/zetalib/form_service.js", "app/zetalib/form_service.js",
"app/zetalib/form_constraints.js",
"app/zetalib/error_service.js", "app/zetalib/error_service.js",
"app/zetalib/action_service.js", "app/zetalib/action_service.js",
"app/zetalib/socket.js", "app/zetalib/socket.js",
...@@ -132,6 +133,7 @@ module.exports = function (grunt) { ...@@ -132,6 +133,7 @@ module.exports = function (grunt) {
"app/components/auth/auth_service.js", "app/components/auth/auth_service.js",
"app/components/dashboard/dashboard_controller.js", "app/components/dashboard/dashboard_controller.js",
"app/components/crud/crud_controller.js", "app/components/crud/crud_controller.js",
"app/components/crud/crud_widgets.js",
"app/components/debug/debug_controller.js", "app/components/debug/debug_controller.js",
"app/components/devSettings/devSettings_controller.js", "app/components/devSettings/devSettings_controller.js",
"app/components/error_pages/error_controller.js", "app/components/error_pages/error_controller.js",
......
...@@ -14,6 +14,7 @@ angular.module('ulakbus.crud') ...@@ -14,6 +14,7 @@ angular.module('ulakbus.crud')
* simply add an item to listnode searching related ulakbus model * simply add an item to listnode searching related ulakbus model
* needs that keys in listnode schema: * needs that keys in listnode schema:
* quick_add: true * quick_add: true
* quick_add_view: <viewname>
* quick_add_model: <modelname> * quick_add_model: <modelname>
* quick_add_field: to which field the data found will be added * quick_add_field: to which field the data found will be added
* thanks u.u * thanks u.u
......
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
<!-- @if NODE_ENV == 'PRODUCTION' --> <!-- @if NODE_ENV == 'PRODUCTION' -->
<script src="bower_components/jquery.min.js"></script> <script src="bower_components/jquery.min.js"></script>
<script src="bower_components/jquery-ui.min.js"></script> <script src="bower_components/jquery-ui.min.js"></script>
<script src="bower_components/angular.min.js"></script> <script src="bower_components/angular.js"></script>
<script src="bower_components/components.js"></script> <script src="bower_components/components.js"></script>
<script src="shared/translations.js"></script> <script src="shared/translations.js"></script>
<script src="templates.js"></script> <script src="templates.js"></script>
......
...@@ -68,7 +68,7 @@ angular.module('ulakbus') ...@@ -68,7 +68,7 @@ angular.module('ulakbus')
$scope.groupNotifications = function (notifications) { $scope.groupNotifications = function (notifications) {
// $scope.notifications = {1: [], 2: [], 3: [], 4: []}; $scope.notifications = {1: [], 2: [], 3: [], 4: []};
angular.forEach(notifications, function (value, key) { angular.forEach(notifications, function (value, key) {
$scope.notifications[value.type].push(value); $scope.notifications[value.type].push(value);
...@@ -336,7 +336,7 @@ angular.module('ulakbus') ...@@ -336,7 +336,7 @@ angular.module('ulakbus')
var newItems = {}; var newItems = {};
angular.forEach(items, function (value, key) { angular.forEach(items, function (value, key) {
newItems[value.kategori] = newItems[value.kategori] || []; newItems[value.kategori] = newItems[value.kategori] || [];
value['baseCategory'] = baseCategory; // value['baseCategory'] = baseCategory;
newItems[value.kategori].push(value); newItems[value.kategori].push(value);
}); });
return newItems; return newItems;
......
...@@ -26,7 +26,9 @@ ...@@ -26,7 +26,9 @@
class="form-control {{form.fieldHtmlClass}}" class="form-control {{form.fieldHtmlClass}}"
schema-validate="form" schema-validate="form"
ng-options="item as item.name for item in form.filteredItems" ng-options="item as item.name for item in form.filteredItems"
name="filterItems" multiple> name="filterItems"
size=30 style="height: 60%;"
multiple>
</select> </select>
</div> </div>
...@@ -45,7 +47,9 @@ ...@@ -45,7 +47,9 @@
class="form-control {{form.fieldHtmlClass}}" class="form-control {{form.fieldHtmlClass}}"
schema-validate="form" schema-validate="form"
ng-options="item as item.name for item in form.selectedFilteredItems" ng-options="item as item.name for item in form.selectedFilteredItems"
name="selectedItems" multiple> name="selectedItems"
size=30 style="height: 60%;"
multiple>
</select> </select>
</div> </div>
</div> </div>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* @author Evren Kutar * @author Evren Kutar
*/ */
angular.module('ulakbus') angular.module('ulakbus')
.factory('FormConstraints', function ($q, $timeout) { .factory('FormConstraints', function ($q, $log, $timeout) {
// Generic functions // Generic functions
/** /**
* gets expression and returns reject/resolve promise * gets expression and returns reject/resolve promise
...@@ -52,7 +52,7 @@ angular.module('ulakbus') ...@@ -52,7 +52,7 @@ angular.module('ulakbus')
* @param type {String} * @param type {String}
* @returns {Promise} * @returns {Promise}
*/ */
fo_co.lt = function (value, ref_val) { fo_co.lt = function (value, ref_val, input_name) {
return cond(value > ref_val); return cond(value > ref_val);
}; };
/** /**
...@@ -62,7 +62,7 @@ angular.module('ulakbus') ...@@ -62,7 +62,7 @@ angular.module('ulakbus')
* @param type {String} * @param type {String}
* @returns {Promise} * @returns {Promise}
*/ */
fo_co.lt_date = function (value, ref_val) { fo_co.lt_date = function (value, ref_val, input_name) {
return cond(value > ref_val); return cond(value > ref_val);
}; };
/** /**
...@@ -72,7 +72,7 @@ angular.module('ulakbus') ...@@ -72,7 +72,7 @@ angular.module('ulakbus')
* @param type {String} * @param type {String}
* @returns {Promise} * @returns {Promise}
*/ */
fo_co.ltm = function (value, ref_vals) { fo_co.ltm = function (value, ref_vals, input_name) {
return cond_multiple(value, ref_vals, 'lt'); return cond_multiple(value, ref_vals, 'lt');
}; };
/** /**
...@@ -82,7 +82,7 @@ angular.module('ulakbus') ...@@ -82,7 +82,7 @@ angular.module('ulakbus')
* @param type {String} * @param type {String}
* @returns {Promise} * @returns {Promise}
*/ */
fo_co.gt = function (value, ref_val) { fo_co.gt = function (value, ref_val, input_name) {
return cond(value < ref_val); return cond(value < ref_val);
}; };
/** /**
...@@ -92,7 +92,7 @@ angular.module('ulakbus') ...@@ -92,7 +92,7 @@ angular.module('ulakbus')
* @param type {String} * @param type {String}
* @returns {Promise} * @returns {Promise}
*/ */
fo_co.gt_date = function (value, ref_val) { fo_co.gt_date = function (value, ref_val, input_name) {
return cond(value < ref_val); return cond(value < ref_val);
}; };
/** /**
...@@ -102,7 +102,7 @@ angular.module('ulakbus') ...@@ -102,7 +102,7 @@ angular.module('ulakbus')
* @param type {String} * @param type {String}
* @returns {Promise} * @returns {Promise}
*/ */
fo_co.gtm = function (value, ref_vals) { fo_co.gtm = function (value, ref_vals, input_name) {
return cond_multiple(value, ref_vals, 'gt'); return cond_multiple(value, ref_vals, 'gt');
}; };
/** /**
...@@ -111,15 +111,27 @@ angular.module('ulakbus') ...@@ -111,15 +111,27 @@ angular.module('ulakbus')
* @param fields {Array} they must be schemaform schema property items * @param fields {Array} they must be schemaform schema property items
* @param type {String} * @param type {String}
*/ */
fo_co.disable_fields = function (value, fields) { fo_co.selectbox_fields = function (value, fields, input_name) {
$timeout(function () { // use disableErrorState to disable hidden field validations
if (value.length > 0) {
// todo: test and make it work var form_items = angular.element(document.querySelectorAll('bootstrap-decorator'));
fields.style = 'hidden'; angular.forEach(form_items, function (v, k) {
angular.element(v).removeClass('hide');
var checkpoint;
try{
if (angular.isDefined(v.querySelector('input')) && v.querySelector('input') !== null ) {
checkpoint = v.querySelector('input').name
} else { } else {
fields.style = 'show'; checkpoint = v.querySelector('select').name;
}
if (checkpoint !== input_name[0] && checkpoint !== fields[value][0]) {
angular.element(v).addClass('hide');
$log.debug(checkpoint, fields[value], angular.isDefined(fields[checkpoint]));
} }
}) } catch(e){
$log.error(e.message);
}
});
}; };
return fo_co; return fo_co;
}); });
\ No newline at end of file
...@@ -248,16 +248,16 @@ angular.module('ulakbus.formService', ['ui.bootstrap']) ...@@ -248,16 +248,16 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
validationMessage: {'form_cons': cons.val_msg}, validationMessage: {'form_cons': cons.val_msg},
$validators: { $validators: {
form_cons: function (value) { form_cons: function (value) {
return FormConstraints[cons.cons](value, cons.val); return FormConstraints[cons.cons](value, cons.val, v);
} }
} }
}; };
} else { } else {
v.key = v.key; v.key = v.key;
v.validationMessage = angular.extend({'form_cons': cons.val_msg}, v.validationMessage); v.validationMessage = angular.extend({'form_cons': cons.val_msg}, v.validationMessage);
v.$asyncValidators = angular.extend({ v.$validators = angular.extend({
form_cons: function (value) { form_cons: function (value) {
return FormConstraints[cons.cons](value, cons.val) return FormConstraints[cons.cons](value, cons.val, v.key);
} }
}, v.$asyncValidators); }, v.$asyncValidators);
} }
...@@ -827,14 +827,15 @@ angular.module('ulakbus.formService', ['ui.bootstrap']) ...@@ -827,14 +827,15 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
}; };
// todo: delete after constraints done // todo: delete after constraints done
scope.forms = scope.forms || {}; // scope.forms = scope.forms || {};
scope.forms.constraints = { // scope.forms.constraints = {
"erkek_kardes_sayisi": { // "cinsiyet": {
"cons": "ltm", // "cons": "selectbox_fields",
"val": ["kiz_kardes_sayisi"], // "val":
"val_msg": "Erkek kardes sayisi kiz kardes sayisindan az olamaz." // {'1': ["kiz_kardes_sayisi"], '2': ["erkek_kardes_sayisi"]},
} // "val_msg": "Erkek kardes sayisi kiz kardes sayisindan az olamaz."
}; // }
// };
angular.forEach(scope.schema.properties, function (v, k) { angular.forEach(scope.schema.properties, function (v, k) {
// generically change _id fields model value // generically change _id fields model value
if ('form_params' in scope) { if ('form_params' in scope) {
......
...@@ -203,7 +203,6 @@ angular.module('ulakbus') ...@@ -203,7 +203,6 @@ angular.module('ulakbus')
wsOps.loggedOut = true; wsOps.loggedOut = true;
websocket.close(); websocket.close();
$log.info("CLOSED"); $log.info("CLOSED");
delete websocket;
}; };
/** /**
* below elements used by togglePageReadyMask function * below elements used by togglePageReadyMask function
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<script src="bower_components/jquery.min.js"></script> <script src="bower_components/jquery.min.js"></script>
<script src="bower_components/jquery-ui.min.js"></script> <script src="bower_components/jquery-ui.min.js"></script>
<script src="bower_components/angular.min.js"></script> <script src="bower_components/angular.js"></script>
<script src="bower_components/components.js"></script> <script src="bower_components/components.js"></script>
<script src="shared/translations.js"></script> <script src="shared/translations.js"></script>
<script src="templates.js"></script> <script src="templates.js"></script>
......
...@@ -2871,7 +2871,9 @@ angular.module("shared/templates/multiselect.html", []).run(["$templateCache", f ...@@ -2871,7 +2871,9 @@ angular.module("shared/templates/multiselect.html", []).run(["$templateCache", f
" class=\"form-control {{form.fieldHtmlClass}}\"\n" + " class=\"form-control {{form.fieldHtmlClass}}\"\n" +
" schema-validate=\"form\"\n" + " schema-validate=\"form\"\n" +
" ng-options=\"item as item.name for item in form.filteredItems\"\n" + " ng-options=\"item as item.name for item in form.filteredItems\"\n" +
" name=\"filterItems\" multiple>\n" + " name=\"filterItems\"\n" +
" size=30 style=\"height: 60%;\"\n" +
" multiple>\n" +
" </select>\n" + " </select>\n" +
" </div>\n" + " </div>\n" +
"\n" + "\n" +
...@@ -2890,7 +2892,9 @@ angular.module("shared/templates/multiselect.html", []).run(["$templateCache", f ...@@ -2890,7 +2892,9 @@ angular.module("shared/templates/multiselect.html", []).run(["$templateCache", f
" class=\"form-control {{form.fieldHtmlClass}}\"\n" + " class=\"form-control {{form.fieldHtmlClass}}\"\n" +
" schema-validate=\"form\"\n" + " schema-validate=\"form\"\n" +
" ng-options=\"item as item.name for item in form.selectedFilteredItems\"\n" + " ng-options=\"item as item.name for item in form.selectedFilteredItems\"\n" +
" name=\"selectedItems\" multiple>\n" + " name=\"selectedItems\"\n" +
" size=30 style=\"height: 60%;\"\n" +
" multiple>\n" +
" </select>\n" + " </select>\n" +
" </div>\n" + " </div>\n" +
" </div>\n" + " </div>\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