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
98fb6cad
Commit
98fb6cad
authored
Mar 11, 2016
by
Evren Kutar
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/issue-5138' into develop
parents
9e02d626
ae0ad443
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
76 additions
and
20 deletions
+76
-20
crud_controller.js
app/components/crud/crud_controller.js
+12
-1
inline_edit.html
app/components/crud/templates/inline_edit.html
+23
-0
list.html
app/components/crud/templates/list.html
+2
-2
nodeTable.html
app/components/crud/templates/nodeTable.html
+6
-4
index.html
app/index.html
+1
-1
main.html
app/main.html
+1
-1
app.js
dist/app.js
+3
-3
components.js
dist/bower_components/components.js
+1
-1
templates.js
dist/templates.js
+27
-7
No files found.
app/components/crud/crud_controller.js
View file @
98fb6cad
...
...
@@ -20,7 +20,7 @@
* @requires ulakbus.formService
* @type {ng.$compileProvider|*}
*/
angular
.
module
(
'ulakbus.crud'
,
[
'schemaForm'
,
'ulakbus.formService'
])
angular
.
module
(
'ulakbus.crud'
,
[
'schemaForm'
,
'u
i.bootstrap'
,
'u
lakbus.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'
)
...
...
app/components/crud/templates/inline_edit.html
0 → 100644
View file @
98fb6cad
<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
app/components/crud/templates/list.html
View file @
98fb6cad
...
...
@@ -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>
...
...
app/components/crud/templates/nodeTable.html
View file @
98fb6cad
...
...
@@ -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"
>
...
...
app/index.html
View file @
98fb6cad
...
...
@@ -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>
...
...
app/main.html
View file @
98fb6cad
...
...
@@ -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>
...
...
dist/app.js
View file @
98fb6cad
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 @
98fb6cad
This diff is collapsed.
Click to expand it.
dist/templates.js
View file @
98fb6cad
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
"
+
...
...
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