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
bcce0e4b
authored
May 16, 2017
by
Sebastián Collado Montañez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
instructions title
parent
88e46368
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
2 deletions
sails/src/assets/scripts/directives/directives.js
sails/src/assets/scripts/modules/student/views/instructions.html
sails/src/assets/styles/main.css
sails/src/assets/scripts/directives/directives.js
View file @
bcce0e4b
...
...
@@ -236,6 +236,7 @@ dashboardDirectives.directive('droppableadd', function() {
}
}
});
dashboardDirectives
.
directive
(
'popoveraddpicto'
,
function
()
{
var
y
=
99999
;
return
{
...
...
@@ -249,3 +250,30 @@ dashboardDirectives.directive('popoveraddpicto', function() {
}
}
});
dashboardDirectives
.
directive
(
"contenteditable"
,
function
()
{
return
{
restrict
:
"A"
,
require
:
"ngModel"
,
link
:
function
(
scope
,
element
,
attrs
,
ngModel
)
{
function
read
()
{
var
html
=
element
.
html
();
html
=
html
.
replace
(
/<br
\s
*
\/?
>/gi
,
''
);
ngModel
.
$setViewValue
(
html
);
}
ngModel
.
$render
=
function
()
{
element
.
html
(
ngModel
.
$viewValue
||
""
);
};
element
.
bind
(
"blur keyup change keydown"
,
function
(
evt
)
{
if
(
evt
.
which
===
13
)
{
evt
.
preventDefault
();
return
;
}
scope
.
$apply
(
read
);
});
}
};
});
sails/src/assets/scripts/modules/student/views/instructions.html
View file @
bcce0e4b
...
...
@@ -92,8 +92,11 @@
</td>
<td
class=
"td-beige"
>
<dl>
<dt
translate
>
instruction
</dt>
<dd><div
class=
"instruction-data"
><input
class=
"editable"
type=
"text"
ng-model=
"i.name"
ng-blur=
"update_instruction(i)"
placeholder=
"{{ 'instruction_name' | translate }}"
></div></dd>
<dt>
<span
contenteditable
ng-model=
"i.name"
ng-blur=
"update_instruction(i)"
></span>
<i
class=
"fa fa-pencil-square-o color_grey"
aria-hidden=
"true"
></i>
</dt>
<!--<dt><div class="instruction-data"><input class="editable" type="text" ng-model="i.name" ng-blur="update_instruction(i)" placeholder="{{ 'instruction_name' | translate }}"></div></dt>-->
<br>
<dt
ng-if=
"!minimalMode"
translate
>
objetive
</dt>
<dd
ng-if=
"!minimalMode"
><div
class=
"instruction-data"
><textarea
class=
"elipsis editable"
type=
"text"
ng-model=
"i.objective"
ng-blur=
"update_instruction(i)"
rows=
"3"
placeholder=
"{{ 'instruction_objetive' | translate }}"
></textarea></div></dd>
</dl>
...
...
sails/src/assets/styles/main.css
View file @
bcce0e4b
...
...
@@ -26,6 +26,9 @@
.color_orange
{
color
:
#FF8901
;
}
.color_grey
{
color
:
#cccccc
;
}
.backgroundcolor_blue
{
background-color
:
#D2DFFF
;
...
...
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