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
de2f2fe2
Commit
de2f2fe2
authored
Feb 14, 2012
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed blackyellow widget
parent
7c7d3559
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
919 additions
and
61 deletions
+919
-61
index.html
resources/library/interactivities/BlackYellow.wgt/index.html
+25
-2
index.html
...ary/interactivities/BlackYellow.wgt/locales/fr/index.html
+25
-0
blackYellow.js
...ivities/BlackYellow.wgt/locales/fr/scripts/blackYellow.js
+408
-0
index.html
...ary/interactivities/BlackYellow.wgt/locales/ru/index.html
+25
-0
blackYellow.js
...ivities/BlackYellow.wgt/locales/ru/scripts/blackYellow.js
+408
-0
blackYellow.js
...ry/interactivities/BlackYellow.wgt/scripts/blackYellow.js
+28
-29
languages.js
...rary/interactivities/BlackYellow.wgt/scripts/languages.js
+0
-30
No files found.
resources/library/interactivities/BlackYellow.wgt/index.html
View file @
de2f2fe2
...
...
@@ -10,12 +10,35 @@ and open the template in the editor.
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/basic.css"
/>
<script
type=
"text/javascript"
src=
"scripts/jquery-1.6.2.min.js"
></script>
<script
src=
"scripts/jquery.disable.text.select.js"
type=
"text/javascript"
></script>
<script
src=
"scripts/languages.js"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
src=
"scripts/blackYellow.js"
></script>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
(){
init
();
var
lang
=
""
;
//locale language
if
(
window
.
sankore
){
lang
=
sankore
.
locale
().
substr
(
0
,
2
);
}
else
lang
=
"en"
;
if
(
lang
==
"en"
)
init
();
else
{
returnStatus
(
lang
);
}
function
returnStatus
(
lang
){
$
.
ajax
({
type
:
'POST'
,
url
:
'locales/'
+
lang
+
'/index.html'
,
statusCode
:
{
404
:
function
()
{
init
();
},
200
:
function
(){
window
.
location
.
href
=
'locales/'
+
lang
+
'/index.html'
;
}
}
});
}
});
</script>
...
...
resources/library/interactivities/BlackYellow.wgt/locales/fr/index.html
0 → 100644
View file @
de2f2fe2
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../../css/basic.css"
/>
<script
type=
"text/javascript"
src=
"../../scripts/jquery-1.6.2.min.js"
></script>
<script
src=
"../../scripts/jquery.disable.text.select.js"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
src=
"scripts/blackYellow.js"
></script>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
(){
init
();
});
</script>
</head>
<body>
</body>
</html>
resources/library/interactivities/BlackYellow.wgt/locales/fr/scripts/blackYellow.js
0 → 100644
View file @
de2f2fe2
This diff is collapsed.
Click to expand it.
resources/library/interactivities/BlackYellow.wgt/locales/ru/index.html
0 → 100644
View file @
de2f2fe2
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../../css/basic.css"
/>
<script
type=
"text/javascript"
src=
"../../scripts/jquery-1.6.2.min.js"
></script>
<script
src=
"../../scripts/jquery.disable.text.select.js"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
src=
"scripts/blackYellow.js"
></script>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
(){
init
();
});
</script>
</head>
<body>
</body>
</html>
resources/library/interactivities/BlackYellow.wgt/locales/ru/scripts/blackYellow.js
0 → 100644
View file @
de2f2fe2
This diff is collapsed.
Click to expand it.
resources/library/interactivities/BlackYellow.wgt/scripts/blackYellow.js
View file @
de2f2fe2
...
...
@@ -13,6 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var
sankoreLang
=
{
display
:
"Display"
,
edit
:
"Edit"
,
add
:
"Add"
,
enter_data
:
"Enter data:"
,
enter_result
:
"Enter result:"
,
ok
:
"Ok"
,
cancel
:
"Cancel"
};
function
init
(){
...
...
@@ -37,17 +38,7 @@ function init(){
x
:
false
,
width
:
0
,
height
:
0
}
if
(
window
.
sankore
){
try
{
lang
=
sankore
.
locale
().
substr
(
0
,
2
);
sankoreLang
[
lang
].
edit
;
}
catch
(
e
){
lang
=
"en"
;
}
}
else
lang
=
"en"
;
}
var
opacityChanged
=
false
;
...
...
@@ -148,9 +139,9 @@ function init(){
},
"fast"
,
function
(){
toggleFlag
=
true
;
if
(
!
mode
)
toggleButton
.
text
(
sankoreLang
[
lang
]
.
edit
);
toggleButton
.
text
(
sankoreLang
.
edit
);
else
toggleButton
.
text
(
sankoreLang
[
lang
]
.
display
);
toggleButton
.
text
(
sankoreLang
.
display
);
});
}
}
...
...
@@ -196,7 +187,7 @@ function init(){
width
:
"115px"
},
"fast"
,
function
(){
addToggleStart
=
true
;
addButton
.
text
(
sankoreLang
[
lang
]
.
add
);
addButton
.
text
(
sankoreLang
.
add
);
});
}
}
...
...
@@ -228,16 +219,16 @@ function init(){
//input fields and buttons for a popup window
var
expressionDiv
=
$
(
"<div id='expressionDiv' class='popupContainers'>"
).
appendTo
(
popupBack
);
var
experssionLabel
=
$
(
"<span id='experssionLabel' class='popupLabels'><b>"
+
sankoreLang
[
lang
]
.
enter_data
+
"</b></span>"
).
appendTo
(
expressionDiv
);
var
experssionLabel
=
$
(
"<span id='experssionLabel' class='popupLabels'><b>"
+
sankoreLang
.
enter_data
+
"</b></span>"
).
appendTo
(
expressionDiv
);
var
expresionText
=
$
(
"<input type='text' id='expresionText' class='expresionInput'/>"
).
appendTo
(
expressionDiv
);
var
resultDiv
=
$
(
"<div id='resultDiv' class='popupContainers'>"
).
appendTo
(
popupBack
);
var
resultLabel
=
$
(
"<span id='resultLabel' class='popupLabels'><b>"
+
sankoreLang
[
lang
]
.
enter_result
+
"</b></span>"
).
appendTo
(
resultDiv
);
var
resultLabel
=
$
(
"<span id='resultLabel' class='popupLabels'><b>"
+
sankoreLang
.
enter_result
+
"</b></span>"
).
appendTo
(
resultDiv
);
var
resultText
=
$
(
"<input type='text' id='resultText' class='expresionInput'/>"
).
appendTo
(
resultDiv
);
var
popupButtonsDiv
=
$
(
"<div id='popupButtonsDiv' class='popupContainers'>"
).
appendTo
(
popupBack
);
var
cancelButton
=
$
(
"<input type='button' id='cancelButton' class='popupButtons' value='"
+
sankoreLang
[
lang
]
.
cancel
+
"'/>"
).
appendTo
(
popupButtonsDiv
);
var
okButton
=
$
(
"<input type='button' id='okButton' class='popupButtons' value='"
+
sankoreLang
[
lang
]
.
ok
+
"'/>"
).
appendTo
(
popupButtonsDiv
);
var
cancelButton
=
$
(
"<input type='button' id='cancelButton' class='popupButtons' value='"
+
sankoreLang
.
cancel
+
"'/>"
).
appendTo
(
popupButtonsDiv
);
var
okButton
=
$
(
"<input type='button' id='okButton' class='popupButtons' value='"
+
sankoreLang
.
ok
+
"'/>"
).
appendTo
(
popupButtonsDiv
);
/* -------------- A WORK WITH POPUP BUTTONS AND FIELDS ---------------*/
...
...
@@ -345,20 +336,20 @@ function init(){
});
// export data
function
exportToSankore
(){
var
objToExport
=
{
data1
:
""
,
data2
:
""
,
width
:
0
,
height
:
0
,
top
:
0
,
left
:
0
}
function
exportToSankore
(){
var
arrayToExport
=
new
Array
();
if
(
mode
){
if
(
$
(
".editContainer"
).
size
()
!=
0
){
$
(
".editContainer"
).
each
(
function
(
index
,
domElem
){
$
(
".editContainer"
).
each
(
function
(
index
,
domElem
){
var
objToExport
=
{
data1
:
""
,
data2
:
""
,
width
:
0
,
height
:
0
,
top
:
0
,
left
:
0
}
objToExport
.
data1
=
$
(
domElem
).
find
(
".readyTask"
).
find
(
":first-child"
).
text
();
objToExport
.
data2
=
$
(
domElem
).
find
(
".readyTask"
).
find
(
":last-child"
).
text
();
objToExport
.
width
=
$
(
domElem
).
width
();
...
...
@@ -371,6 +362,14 @@ function init(){
}
else
{
if
(
$
(
".readyTask"
).
size
()
!=
0
){
$
(
".readyTask"
).
each
(
function
(
index
,
domElem
){
var
objToExport
=
{
data1
:
""
,
data2
:
""
,
width
:
0
,
height
:
0
,
top
:
0
,
left
:
0
}
objToExport
.
data1
=
$
(
domElem
).
find
(
":first-child"
).
text
();
objToExport
.
data2
=
$
(
domElem
).
find
(
":last-child"
).
text
();
objToExport
.
width
=
$
(
domElem
).
width
();
...
...
resources/library/interactivities/BlackYellow.wgt/scripts/languages.js
deleted
100644 → 0
View file @
7c7d3559
var
sankoreLang
=
{
"en"
:{
"edit"
:
"Edit"
,
"display"
:
"Display"
,
"add"
:
"Add"
,
"enter_data"
:
"Enter data:"
,
"enter_result"
:
"Enter result:"
,
"ok"
:
"Ok"
,
"cancel"
:
"Cancel"
},
"ru"
:{
"edit"
:
"Изменить"
,
"display"
:
"Показать"
,
"add"
:
"Добавить"
,
"enter_data"
:
"Введите вопрос:"
,
"enter_result"
:
"Введите ответ:"
,
"ok"
:
"Ок"
,
"cancel"
:
"Отмена"
},
"fr"
:{
"edit"
:
"Modifier"
,
"display"
:
"Afficher"
,
"add"
:
"Ajouter"
,
"enter_data"
:
"Entrer les données:"
,
"enter_result"
:
"Entrez le résultat:"
,
"ok"
:
"Ok"
,
"cancel"
:
"Annuler"
}
};
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