Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
ulakbus-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ulakbus
ulakbus-ui
Commits
c247db93
Commit
c247db93
authored
Apr 26, 2016
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
generate dist
parent
299442f6
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
63 additions
and
40 deletions
+63
-40
Gruntfile.js
Gruntfile.js
+3
-1
crud_widgets.js
app/components/crud/crud_widgets.js
+1
-0
main.html
app/main.html
+1
-1
directives.js
app/shared/directives.js
+2
-2
multiselect.html
app/shared/templates/multiselect.html
+6
-2
form_constraints.js
app/zetalib/form_constraints.js
+27
-15
form_service.js
app/zetalib/form_service.js
+12
-11
socket.js
app/zetalib/socket.js
+0
-1
app.js
dist/app.js
+3
-3
components.js
dist/bower_components/components.js
+1
-1
index.html
dist/index.html
+1
-1
templates.js
dist/templates.js
+6
-2
No files found.
Gruntfile.js
View file @
c247db93
...
@@ -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"
,
...
...
app/components/crud/crud_widgets.js
View file @
c247db93
...
@@ -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
...
...
app/main.html
View file @
c247db93
...
@@ -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>
...
...
app/shared/directives.js
View file @
c247db93
...
@@ -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
;
...
...
app/shared/templates/multiselect.html
View file @
c247db93
...
@@ -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>
...
...
app/zetalib/form_constraints.js
View file @
c247db93
...
@@ -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
)
{
}
else
{
angular
.
element
(
v
).
removeClass
(
'hide'
);
fields
.
style
=
'show'
;
var
checkpoint
;
try
{
if
(
angular
.
isDefined
(
v
.
querySelector
(
'input'
))
&&
v
.
querySelector
(
'input'
)
!==
null
)
{
checkpoint
=
v
.
querySelector
(
'input'
).
name
}
else
{
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
app/zetalib/form_service.js
View file @
c247db93
...
@@ -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
.
$
asyncV
alidators
=
angular
.
extend
({
v
.
$
v
alidators
=
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
)
{
...
...
app/zetalib/socket.js
View file @
c247db93
...
@@ -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
...
...
dist/app.js
View file @
c247db93
This source diff could not be displayed because it is too large. You can
view the blob
instead.
dist/bower_components/components.js
View file @
c247db93
This diff is collapsed.
Click to expand it.
dist/index.html
View file @
c247db93
...
@@ -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>
...
...
dist/templates.js
View file @
c247db93
...
@@ -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
"
+
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment