Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
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
lifo
Nicolas Ollinger
OpenBoard
Commits
537381db
Commit
537381db
authored
Jul 14, 2011
by
shibakaneki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolved issue Sankore-174
parent
680909c5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
app.js
resources/library/interactive/barre_prof.wgt/scripts/app.js
+18
-18
No files found.
resources/library/interactive/barre_prof.wgt/scripts/app.js
View file @
537381db
//
uniboard
= {
//
sankore
= {
// preference : function(){},
// setPreference : function(){}
// }
...
...
@@ -14,7 +14,7 @@ $(document).ready(function()
function
_init
()
{
w
.
setSplashContent
(
'<img src="custom_icon.png" alt="Click">'
);
w
.
setEditContent
(
'<textarea style="width: 100%; height: 100%;">'
+
(
window
.
uniboard
.
preference
(
"text"
)
||
'Type a note here'
)
+
'</textarea>'
);
w
.
setEditContent
(
'<textarea style="width: 100%; height: 100%;">'
+
(
window
.
sankore
.
preference
(
"text"
)
||
'Type a note here'
)
+
'</textarea>'
);
w
.
elements
.
containerEdit
.
find
(
"textarea"
).
tinymce
(
{
script_url
:
'tinymcejq/tiny_mce.js'
,
...
...
@@ -41,16 +41,16 @@ $(document).ready(function()
{
ed
.
onKeyUp
.
add
(
function
(
ed
,
e
)
{
if
(
window
.
uniboard
)
if
(
window
.
sankore
)
{
window
.
uniboard
.
setPreference
(
"text"
,
ed
.
getContent
());
window
.
sankore
.
setPreference
(
"text"
,
ed
.
getContent
());
}
});
ed
.
onExecCommand
.
add
(
function
(
ed
,
e
)
{
if
(
window
.
uniboard
)
if
(
window
.
sankore
)
{
window
.
uniboard
.
setPreference
(
"text"
,
ed
.
getContent
());
window
.
sankore
.
setPreference
(
"text"
,
ed
.
getContent
());
}
});
},
...
...
@@ -63,9 +63,9 @@ $(document).ready(function()
});
w
.
modeView
();
// init view mode
w
.
modeEdit
();
// init edit mode
if
(
window
.
uniboard
.
preference
(
"state"
)
==
'view'
)
// back to view mode if last state was it
if
(
window
.
sankore
.
preference
(
"state"
)
==
'view'
)
// back to view mode if last state was it
w
.
modeView
();
if
(
window
.
uniboard
.
preference
(
"is_splash"
)
==
'1'
)
if
(
window
.
sankore
.
preference
(
"is_splash"
)
==
'1'
)
w
.
modeSplash
(
true
);
w
.
allowResize
=
true
;
};
...
...
@@ -84,15 +84,15 @@ $(document).ready(function()
w
.
getWidth
=
function
()
{
var
res
=
360
;
if
(
window
.
uniboard
&&
window
.
uniboard
.
preference
(
"width"
))
res
=
parseInt
(
window
.
uniboard
.
preference
(
"width"
));
if
(
window
.
sankore
&&
window
.
sankore
.
preference
(
"width"
))
res
=
parseInt
(
window
.
sankore
.
preference
(
"width"
));
return
res
;
};
w
.
getHeight
=
function
()
{
var
res
=
230
;
if
(
window
.
uniboard
&&
window
.
uniboard
.
preference
(
"height"
))
res
=
parseInt
(
window
.
uniboard
.
preference
(
"height"
));
if
(
window
.
sankore
&&
window
.
sankore
.
preference
(
"height"
))
res
=
parseInt
(
window
.
sankore
.
preference
(
"height"
));
return
res
;
};
...
...
@@ -121,24 +121,24 @@ $(document).ready(function()
w
.
elements
.
container
.
width
(
winwidth
);
w
.
elements
.
container
.
height
(
winheight
);
tinyMCE
.
activeEditor
.
theme
.
resizeTo
(
winwidth
,
winheight
-
98
);
if
(
window
.
uniboard
)
if
(
window
.
sankore
)
{
window
.
uniboard
.
setPreference
(
"width"
,
winwidth
);
window
.
uniboard
.
setPreference
(
"height"
,
winheight
-
33
);
window
.
sankore
.
setPreference
(
"width"
,
winwidth
);
window
.
sankore
.
setPreference
(
"height"
,
winheight
-
33
);
}
};
w
.
modeView
=
function
()
{
if
(
w
.
allowResize
)
window
.
uniboard
.
setPreference
(
"state"
,
"view"
);
window
.
sankore
.
setPreference
(
"state"
,
"view"
);
return
_super_modeView
.
call
(
this
);
}
w
.
modeEdit
=
function
()
{
if
(
w
.
allowResize
)
window
.
uniboard
.
setPreference
(
"state"
,
"edit"
);
window
.
sankore
.
setPreference
(
"state"
,
"edit"
);
return
_super_modeEdit
.
call
(
this
);
}
...
...
@@ -146,7 +146,7 @@ $(document).ready(function()
{
if
(
enable
==
undefined
)
enable
=
true
;
window
.
uniboard
.
setPreference
(
"is_splash"
,
(
w
.
allowResize
&&
enable
)?
1
:
0
);
window
.
sankore
.
setPreference
(
"is_splash"
,
(
w
.
allowResize
&&
enable
)?
1
:
0
);
return
_super_modeSplash
.
call
(
this
,
enable
);
}
...
...
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