Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
92eba8c1
authored
Feb 15, 2017
by
Sebastián Collado Montañez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
working on own pictos modal
parent
938efbbd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
28 deletions
sails/src/assets/scripts/modules/student/controllers/addpicto.js
sails/src/assets/scripts/modules/student/views/addpicto.html
sails/src/assets/scripts/modules/student/controllers/addpicto.js
View file @
92eba8c1
...
@@ -39,28 +39,6 @@ dashboardControllers.controller('AddPictoCtrl', function (
...
@@ -39,28 +39,6 @@ dashboardControllers.controller('AddPictoCtrl', function (
exp
:
'Inicio'
,
exp
:
'Inicio'
,
glyphicon
:
'glyphicon glyphicon-home'
glyphicon
:
'glyphicon glyphicon-home'
});
});
// Request of general pictos categories (symbolstx)
$http
.
get
(
config
.
backend
+
'/sup/'
+
supervisor
.
id
+
'/pic_categories/0'
)
.
success
(
function
(
data
)
{
$scope
.
symbolstxCats
=
data
;
})
.
error
(
function
()
{
$translate
(
'error_loading_pictos'
).
then
(
function
(
translation
)
{
ngToast
.
danger
({
content
:
translation
});
});
});
// Request page 1 pictos (symbolstx)
$http
.
get
(
config
.
backend
+
'/sup/'
+
supervisor
.
id
+
'/pic_fromSymbolStx/page/1/limit/'
+
$scope
.
limit
)
.
success
(
function
(
data
)
{
$scope
.
pictos
=
data
;
})
.
error
(
function
()
{
$translate
(
'error_loading_pictos'
).
then
(
function
(
translation
)
{
ngToast
.
danger
({
content
:
translation
});
});
});
}
}
//
//
...
@@ -80,8 +58,9 @@ dashboardControllers.controller('AddPictoCtrl', function (
...
@@ -80,8 +58,9 @@ dashboardControllers.controller('AddPictoCtrl', function (
}
}
$http
.
get
(
request
)
$http
.
get
(
request
)
.
success
(
function
(
data
)
{
.
success
(
function
(
data
)
{
if
(
data
)
if
(
data
&&
$scope
.
source
==
'symbolstx'
){
$scope
.
pictos
=
data
;
$scope
.
pictos
=
data
;
}
$scope
.
loadingCatPictos
=
false
;
$scope
.
loadingCatPictos
=
false
;
setTimeout
(
function
()
{
$scope
.
$apply
();
});
setTimeout
(
function
()
{
$scope
.
$apply
();
});
})
})
...
@@ -122,9 +101,12 @@ dashboardControllers.controller('AddPictoCtrl', function (
...
@@ -122,9 +101,12 @@ dashboardControllers.controller('AddPictoCtrl', function (
$http
.
get
(
config
.
backend
+
'/sup/'
+
supervisor
.
id
+
'/pic_categories/'
+
categoryId
)
$http
.
get
(
config
.
backend
+
'/sup/'
+
supervisor
.
id
+
'/pic_categories/'
+
categoryId
)
.
success
(
function
(
data
,
status
,
headers
,
config
)
{
.
success
(
function
(
data
,
status
,
headers
,
config
)
{
// Add to list
// Add to list
if
(
data
)
if
(
data
&&
$scope
.
source
==
'symbolstx'
){
$scope
.
symbolstxCats
=
data
;
$scope
.
symbolstxCats
=
data
;
else
$scope
.
symbolstxCats
=
[];
}
else
{
$scope
.
symbolstxCats
=
[];
}
})
})
.
error
(
function
(
data
,
status
,
headers
,
config
)
{
.
error
(
function
(
data
,
status
,
headers
,
config
)
{
});
});
...
@@ -379,7 +361,13 @@ dashboardControllers.controller('AddPictoCtrl', function (
...
@@ -379,7 +361,13 @@ dashboardControllers.controller('AddPictoCtrl', function (
}
}
};
};
if
(
onlyOwn
)
//Initial load category and pictos
if
(
onlyOwn
){
$scope
.
load_own_pictos
();
$scope
.
load_own_pictos
();
}
else
{
$scope
.
load_category
(
0
);
$scope
.
load_pictos
(
0
);
}
});
});
sails/src/assets/scripts/modules/student/views/addpicto.html
View file @
92eba8c1
...
@@ -61,8 +61,8 @@
...
@@ -61,8 +61,8 @@
<input
type=
"text"
class=
"form-control"
placeholder=
"{{ 'filter' | translate }}"
<input
type=
"text"
class=
"form-control"
placeholder=
"{{ 'filter' | translate }}"
id=
"srch_term_picto"
name=
"srch_term_picto"
ng-model=
"srch_term_picto"
>
id=
"srch_term_picto"
name=
"srch_term_picto"
ng-model=
"srch_term_picto"
>
<span
class=
"input-group-btn"
>
<span
class=
"input-group-btn"
>
<button
type=
"submit"
class=
"btn btn-
primary
"
>
<button
type=
"submit"
class=
"btn btn-
default
"
>
<i
class=
"fa fa-search"
aria-hidden=
"true"
></i>
{{ 'search' | translate }}
<i
class=
"fa fa-search"
aria-hidden=
"true"
></i>
</button>
</button>
</span>
</span>
</div>
</div>
...
...
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