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
bcdd655b
Commit
bcdd655b
authored
12 years ago
by
Ilia Ryabokon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Sankore/Sankore-3.1
parents
2fdc027a
67fbd3a1
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
159 additions
and
78 deletions
+159
-78
basic.css
...urces/library/interactivities/Contraste.wgt/css/basic.css
+13
-7
trgDown.png
.../library/interactivities/Contraste.wgt/images/trgDown.png
+0
-0
trgRight.png
...library/interactivities/Contraste.wgt/images/trgRight.png
+0
-0
blackYellow.js
...ctivities/Contraste.wgt/locales/fr/scripts/blackYellow.js
+47
-23
blackYellow.js
...ctivities/Contraste.wgt/locales/ru/scripts/blackYellow.js
+47
-23
blackYellow.js
...rary/interactivities/Contraste.wgt/scripts/blackYellow.js
+50
-25
UBFeaturesActionBar.h
src/gui/UBFeaturesActionBar.h
+1
-0
UBFeaturesWidget.cpp
src/gui/UBFeaturesWidget.cpp
+1
-0
No files found.
resources/library/interactivities/Contraste.wgt/css/basic.css
View file @
bcdd655b
...
@@ -60,6 +60,7 @@ body{
...
@@ -60,6 +60,7 @@ body{
.shadowDiv
{
.shadowDiv
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
display
:
none
;
display
:
none
;
opacity
:
0.7
;
opacity
:
0.7
;
background-color
:
black
;
background-color
:
black
;
...
@@ -67,7 +68,10 @@ body{
...
@@ -67,7 +68,10 @@ body{
-webkit-border-radius
:
3px
;
-webkit-border-radius
:
3px
;
border-radius
:
3px
;
border-radius
:
3px
;
border-radius
:
3px
;
border-radius
:
3px
;
z-index
:
100
;
z-index
:
400
;
position
:
absolute
;
top
:
0
;
left
:
0
;
}
}
.popupBack
{
.popupBack
{
...
@@ -126,8 +130,6 @@ body{
...
@@ -126,8 +130,6 @@ body{
}
}
.readyTask
{
.readyTask
{
margin
:
2px
;
padding
:
2px
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
overflow
:
hidden
;
overflow
:
hidden
;
...
@@ -167,9 +169,11 @@ body{
...
@@ -167,9 +169,11 @@ body{
height
:
65%
;
height
:
65%
;
cursor
:
e-resize
;
cursor
:
e-resize
;
position
:
absolute
;
position
:
absolute
;
background
:
none
;
background-image
:
url(../images/trgRight.png)
;
background-position
:
center
;
background-repeat
:
no-repeat
;
right
:
-10px
;
right
:
-10px
;
top
:
20
%
;
top
:
18
%
;
}
}
.bottomResize
{
.bottomResize
{
...
@@ -177,9 +181,11 @@ body{
...
@@ -177,9 +181,11 @@ body{
height
:
10px
;
height
:
10px
;
cursor
:
n-resize
;
cursor
:
n-resize
;
position
:
absolute
;
position
:
absolute
;
background
:
none
;
background-image
:
url(../images/trgDown.png)
;
background-position
:
center
;
background-repeat
:
no-repeat
;
bottom
:
-10px
;
bottom
:
-10px
;
left
:
20
%
;
left
:
18
%
;
}
}
/*new design*/
/*new design*/
...
...
This diff is collapsed.
Click to expand it.
resources/library/interactivities/Contraste.wgt/images/trgDown.png
0 → 100644
View file @
bcdd655b
475 Bytes
This diff is collapsed.
Click to expand it.
resources/library/interactivities/Contraste.wgt/images/trgRight.png
0 → 100644
View file @
bcdd655b
447 Bytes
This diff is collapsed.
Click to expand it.
resources/library/interactivities/Contraste.wgt/locales/fr/scripts/blackYellow.js
View file @
bcdd655b
...
@@ -81,9 +81,9 @@ function init(){
...
@@ -81,9 +81,9 @@ function init(){
.
css
(
"top"
,
importArray
[
i
].
top
)
.
css
(
"top"
,
importArray
[
i
].
top
)
.
css
(
"left"
,
importArray
[
i
].
left
);
.
css
(
"left"
,
importArray
[
i
].
left
);
tmpReadyTask
.
appendTo
(
"#data"
);
tmpReadyTask
.
appendTo
(
"#data"
);
}
}
}
$
(
document
).
disableTextSelect
();
$
(
document
).
disableTextSelect
();
}
}
}
/* ------------- BUTTONS -------------*/
/* ------------- BUTTONS -------------*/
...
@@ -182,10 +182,16 @@ function init(){
...
@@ -182,10 +182,16 @@ function init(){
});
});
$
(
"#wgt_add"
).
click
(
function
(){
$
(
"#wgt_add"
).
click
(
function
(){
shadowDiv
.
show
(
"fast"
,
function
(){
if
(
$
(
"#wgt_help"
).
hasClass
(
"open"
)){
shadowOver
=
true
;
$
(
"#help"
).
slideUp
(
"100"
,
function
(){
popupBack
.
show
(
"slow"
);
$
(
"#wgt_help"
).
removeClass
(
"open"
);
});
$
(
"#data"
).
show
();
});
}
shadowDiv
.
show
()
shadowOver
=
true
;
popupBack
.
show
(
"slow"
);
$
(
document
).
disableTextSelect
();
$
(
document
).
disableTextSelect
();
});
});
...
@@ -203,7 +209,7 @@ function init(){
...
@@ -203,7 +209,7 @@ function init(){
var
rightDiv
=
$
(
"<div id='rightDiv' class='rightDiv'>"
).
appendTo
(
"#data"
);
var
rightDiv
=
$
(
"<div id='rightDiv' class='rightDiv'>"
).
appendTo
(
"#data"
);
//divs for adding a new item
//divs for adding a new item
var
shadowDiv
=
$
(
"<div id='shadowDiv' class='shadowDiv'>"
).
appendTo
(
"
#data
"
);
var
shadowDiv
=
$
(
"<div id='shadowDiv' class='shadowDiv'>"
).
appendTo
(
"
html
"
);
var
popupBack
=
$
(
"<div id='popupBack' class='popupBack'>"
).
appendTo
(
"#data"
);
var
popupBack
=
$
(
"<div id='popupBack' class='popupBack'>"
).
appendTo
(
"#data"
);
//input fields and buttons for a popup window
//input fields and buttons for a popup window
...
@@ -228,37 +234,39 @@ function init(){
...
@@ -228,37 +234,39 @@ function init(){
});
});
cancelButton
.
click
(
function
(){
cancelButton
.
click
(
function
(){
$
(
document
).
enableTextSelect
();
popupBack
.
hide
(
"slow"
,
function
(){
popupBack
.
hide
(
"slow"
,
function
(){
$
(
"#resultText, #expresionText"
).
val
(
""
)
$
(
"#resultText, #expresionText"
).
val
(
""
)
.
css
(
"background-color"
,
"#ffc"
);
.
css
(
"background-color"
,
"#ffc"
);
shadowDiv
.
hide
(
"fast"
);
shadowDiv
.
hide
();
shadowOver
=
false
;
shadowOver
=
false
;
$
(
document
).
enableTextSelect
();
});
});
});
});
okButton
.
click
(
function
(){
okButton
.
click
(
function
(){
$
(
document
).
enableTextSelect
();
if
(
checkEmptyFields
(
expresionText
)
&&
checkEmptyFields
(
resultText
)){
if
(
checkEmptyFields
(
expresionText
)
&&
checkEmptyFields
(
resultText
)){
popupBack
.
hide
(
"slow"
,
function
(){
popupBack
.
hide
(
"slow"
,
function
(){
shadowDiv
.
hide
(
"fast"
);
shadowDiv
.
hide
();
shadowOver
=
false
;
shadowOver
=
false
;
addTask
(
expresionText
.
val
(),
resultText
.
val
());
addTask
(
expresionText
.
val
(),
resultText
.
val
());
exportToSankore
();
exportToSankore
();
$
(
"#resultText, #expresionText"
).
val
(
""
)
$
(
"#resultText, #expresionText"
).
val
(
""
)
.
css
(
"background-color"
,
"#ffc"
);
.
css
(
"background-color"
,
"#ffc"
);
$
(
document
).
enableTextSelect
();
})
})
}
}
});
});
/* -------------- THE END OF WORK WITH POPUP BUTTONS AND FIELDS ---------------*/
/* -------------- THE END OF WORK WITH POPUP BUTTONS AND FIELDS ---------------*/
// a work with dragging possibility
// a work with dragging possibility
$
(
"input:text
, .style_select
"
).
mouseover
(
function
(){
$
(
"input:text"
).
mouseover
(
function
(){
$
(
document
).
enableTextSelect
();
$
(
document
).
enableTextSelect
();
});
});
$
(
"input:text
, .style_select
"
).
mouseout
(
function
(){
$
(
"input:text"
).
mouseout
(
function
(){
$
(
document
).
disableTextSelect
();
$
(
document
).
disableTextSelect
();
});
});
...
@@ -270,6 +278,8 @@ function init(){
...
@@ -270,6 +278,8 @@ function init(){
resizeObj
.
width
=
$
(
this
).
width
();
resizeObj
.
width
=
$
(
this
).
width
();
resizeObj
.
height
=
$
(
this
).
height
();
resizeObj
.
height
=
$
(
this
).
height
();
}
}
if
(
$
(
"#wgt_display"
).
hasClass
(
"selected"
))
$
(
document
).
disableTextSelect
();
});
});
$
(
".rightResize"
).
live
(
"mousedown"
,
function
(
event
){
$
(
".rightResize"
).
live
(
"mousedown"
,
function
(
event
){
...
@@ -296,13 +306,25 @@ function init(){
...
@@ -296,13 +306,25 @@ function init(){
});
});
$
(
"body"
).
mousemove
(
function
(
event
){
$
(
"body"
).
mousemove
(
function
(
event
){
if
(
dragElement
&&
!
shadowOver
){
if
(
dragElement
&&
!
shadowOver
){
if
(
resizeObj
.
x
)
var
top
=
event
.
pageY
-
coords
.
top
;
dragElement
.
width
(
event
.
pageX
-
dragElement
.
position
().
left
);
var
left
=
event
.
pageX
-
coords
.
left
;
else
if
(
resizeObj
.
y
)
var
bottom
=
top
+
dragElement
.
height
();
dragElement
.
height
(
event
.
pageY
-
dragElement
.
position
().
top
);
var
right
=
left
+
dragElement
.
width
();
else
if
(
resizeObj
.
x
){
dragElement
.
css
(
"top"
,
event
.
pageY
-
coords
.
top
).
css
(
"left"
,
event
.
pageX
-
coords
.
left
);
if
(
right
<
(
$
(
window
).
width
()
-
54
))
dragElement
.
width
(
event
.
pageX
-
dragElement
.
position
().
left
);
}
else
if
(
resizeObj
.
y
){
if
(
bottom
<
(
$
(
window
).
height
()
-
54
))
dragElement
.
height
(
event
.
pageY
-
dragElement
.
position
().
top
);
}
else
{
if
((
top
>
54
)
&&
(
bottom
<
(
$
(
window
).
height
()
-
54
)))
dragElement
.
css
(
"top"
,
event
.
pageY
-
coords
.
top
);
if
((
left
>=
54
)
&&
(
right
<
(
$
(
window
).
width
()
-
54
)))
dragElement
.
css
(
"left"
,
event
.
pageX
-
coords
.
left
);
}
}
}
});
});
...
@@ -393,8 +415,8 @@ function checkEmptyFields(field){
...
@@ -393,8 +415,8 @@ function checkEmptyFields(field){
//adding a new task to the page
//adding a new task to the page
function
addTask
(
expression
,
result
){
function
addTask
(
expression
,
result
){
var
lastItem
=
$
(
".editContainer:last"
),
var
lastItem
=
$
(
".editContainer:last"
),
lastItemPos
=
lastItem
.
length
?
lastItem
.
position
().
top
:
45
,
lastItemPos
=
lastItem
.
length
?
lastItem
.
position
().
top
:
45
,
lastItemHeight
=
lastItem
.
length
?
lastItem
.
height
()
:
0
;
lastItemHeight
=
lastItem
.
length
?
lastItem
.
height
()
:
0
;
var
editContent
=
$
(
"<div class='editContainer'>"
).
width
(
240
).
height
(
70
).
css
(
"top"
,
lastItemPos
+
lastItemHeight
+
15
+
"px"
).
appendTo
(
"#data"
);
var
editContent
=
$
(
"<div class='editContainer'>"
).
width
(
240
).
height
(
70
).
css
(
"top"
,
lastItemPos
+
lastItemHeight
+
15
+
"px"
).
appendTo
(
"#data"
);
var
closeItem
=
$
(
"<div class='closeItem'>"
).
appendTo
(
editContent
);
var
closeItem
=
$
(
"<div class='closeItem'>"
).
appendTo
(
editContent
);
var
rightResize
=
$
(
"<div class='rightResize'>"
).
appendTo
(
editContent
);
var
rightResize
=
$
(
"<div class='rightResize'>"
).
appendTo
(
editContent
);
...
@@ -463,4 +485,6 @@ function changeStyle(val){
...
@@ -463,4 +485,6 @@ function changeStyle(val){
$
(
"body, html"
).
addClass
(
"without_radius"
);
$
(
"body, html"
).
addClass
(
"without_radius"
);
break
;
break
;
}
}
if
(
$
(
"#wgt_edit"
).
hasClass
(
"selected"
))
$
(
document
).
enableTextSelect
();
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
resources/library/interactivities/Contraste.wgt/locales/ru/scripts/blackYellow.js
View file @
bcdd655b
...
@@ -23,9 +23,9 @@ var sankoreLang = {
...
@@ -23,9 +23,9 @@ var sankoreLang = {
cancel
:
"Отмена"
,
cancel
:
"Отмена"
,
wgt_name
:
"Черный/желтый"
,
wgt_name
:
"Черный/желтый"
,
reload
:
"Обновить"
,
reload
:
"Обновить"
,
slate
:
"
У
зор"
,
slate
:
"
у
зор"
,
pad
:
"
П
ланшет"
,
pad
:
"
п
ланшет"
,
none
:
"
Н
ет"
,
none
:
"
н
ет"
,
help
:
"Помощь"
,
help
:
"Помощь"
,
help_content
:
"Пример текста помощи ..."
help_content
:
"Пример текста помощи ..."
};
};
...
@@ -182,10 +182,16 @@ function init(){
...
@@ -182,10 +182,16 @@ function init(){
});
});
$
(
"#wgt_add"
).
click
(
function
(){
$
(
"#wgt_add"
).
click
(
function
(){
shadowDiv
.
show
(
"fast"
,
function
(){
if
(
$
(
"#wgt_help"
).
hasClass
(
"open"
)){
shadowOver
=
true
;
$
(
"#help"
).
slideUp
(
"100"
,
function
(){
popupBack
.
show
(
"slow"
);
$
(
"#wgt_help"
).
removeClass
(
"open"
);
});
$
(
"#data"
).
show
();
});
}
shadowDiv
.
show
()
shadowOver
=
true
;
popupBack
.
show
(
"slow"
);
$
(
document
).
disableTextSelect
();
$
(
document
).
disableTextSelect
();
});
});
...
@@ -203,7 +209,7 @@ function init(){
...
@@ -203,7 +209,7 @@ function init(){
var
rightDiv
=
$
(
"<div id='rightDiv' class='rightDiv'>"
).
appendTo
(
"#data"
);
var
rightDiv
=
$
(
"<div id='rightDiv' class='rightDiv'>"
).
appendTo
(
"#data"
);
//divs for adding a new item
//divs for adding a new item
var
shadowDiv
=
$
(
"<div id='shadowDiv' class='shadowDiv'>"
).
appendTo
(
"
#data
"
);
var
shadowDiv
=
$
(
"<div id='shadowDiv' class='shadowDiv'>"
).
appendTo
(
"
html
"
);
var
popupBack
=
$
(
"<div id='popupBack' class='popupBack'>"
).
appendTo
(
"#data"
);
var
popupBack
=
$
(
"<div id='popupBack' class='popupBack'>"
).
appendTo
(
"#data"
);
//input fields and buttons for a popup window
//input fields and buttons for a popup window
...
@@ -228,37 +234,39 @@ function init(){
...
@@ -228,37 +234,39 @@ function init(){
});
});
cancelButton
.
click
(
function
(){
cancelButton
.
click
(
function
(){
$
(
document
).
enableTextSelect
();
popupBack
.
hide
(
"slow"
,
function
(){
popupBack
.
hide
(
"slow"
,
function
(){
$
(
"#resultText, #expresionText"
).
val
(
""
)
$
(
"#resultText, #expresionText"
).
val
(
""
)
.
css
(
"background-color"
,
"#ffc"
);
.
css
(
"background-color"
,
"#ffc"
);
shadowDiv
.
hide
(
"fast"
);
shadowDiv
.
hide
();
shadowOver
=
false
;
shadowOver
=
false
;
$
(
document
).
enableTextSelect
();
});
});
});
});
okButton
.
click
(
function
(){
okButton
.
click
(
function
(){
$
(
document
).
enableTextSelect
();
if
(
checkEmptyFields
(
expresionText
)
&&
checkEmptyFields
(
resultText
)){
if
(
checkEmptyFields
(
expresionText
)
&&
checkEmptyFields
(
resultText
)){
popupBack
.
hide
(
"slow"
,
function
(){
popupBack
.
hide
(
"slow"
,
function
(){
shadowDiv
.
hide
(
"fast"
);
shadowDiv
.
hide
();
shadowOver
=
false
;
shadowOver
=
false
;
addTask
(
expresionText
.
val
(),
resultText
.
val
());
addTask
(
expresionText
.
val
(),
resultText
.
val
());
exportToSankore
();
exportToSankore
();
$
(
"#resultText, #expresionText"
).
val
(
""
)
$
(
"#resultText, #expresionText"
).
val
(
""
)
.
css
(
"background-color"
,
"#ffc"
);
.
css
(
"background-color"
,
"#ffc"
);
$
(
document
).
enableTextSelect
();
})
})
}
}
});
});
/* -------------- THE END OF WORK WITH POPUP BUTTONS AND FIELDS ---------------*/
/* -------------- THE END OF WORK WITH POPUP BUTTONS AND FIELDS ---------------*/
// a work with dragging possibility
// a work with dragging possibility
$
(
"input:text
, .style_select
"
).
mouseover
(
function
(){
$
(
"input:text"
).
mouseover
(
function
(){
$
(
document
).
enableTextSelect
();
$
(
document
).
enableTextSelect
();
});
});
$
(
"input:text
, .style_select
"
).
mouseout
(
function
(){
$
(
"input:text"
).
mouseout
(
function
(){
$
(
document
).
disableTextSelect
();
$
(
document
).
disableTextSelect
();
});
});
...
@@ -270,6 +278,8 @@ function init(){
...
@@ -270,6 +278,8 @@ function init(){
resizeObj
.
width
=
$
(
this
).
width
();
resizeObj
.
width
=
$
(
this
).
width
();
resizeObj
.
height
=
$
(
this
).
height
();
resizeObj
.
height
=
$
(
this
).
height
();
}
}
if
(
$
(
"#wgt_display"
).
hasClass
(
"selected"
))
$
(
document
).
disableTextSelect
();
});
});
$
(
".rightResize"
).
live
(
"mousedown"
,
function
(
event
){
$
(
".rightResize"
).
live
(
"mousedown"
,
function
(
event
){
...
@@ -296,13 +306,25 @@ function init(){
...
@@ -296,13 +306,25 @@ function init(){
});
});
$
(
"body"
).
mousemove
(
function
(
event
){
$
(
"body"
).
mousemove
(
function
(
event
){
if
(
dragElement
&&
!
shadowOver
){
if
(
dragElement
&&
!
shadowOver
){
if
(
resizeObj
.
x
)
var
top
=
event
.
pageY
-
coords
.
top
;
dragElement
.
width
(
event
.
pageX
-
dragElement
.
position
().
left
);
var
left
=
event
.
pageX
-
coords
.
left
;
else
if
(
resizeObj
.
y
)
var
bottom
=
top
+
dragElement
.
height
();
dragElement
.
height
(
event
.
pageY
-
dragElement
.
position
().
top
);
var
right
=
left
+
dragElement
.
width
();
else
if
(
resizeObj
.
x
){
dragElement
.
css
(
"top"
,
event
.
pageY
-
coords
.
top
).
css
(
"left"
,
event
.
pageX
-
coords
.
left
);
if
(
right
<
(
$
(
window
).
width
()
-
54
))
dragElement
.
width
(
event
.
pageX
-
dragElement
.
position
().
left
);
}
else
if
(
resizeObj
.
y
){
if
(
bottom
<
(
$
(
window
).
height
()
-
54
))
dragElement
.
height
(
event
.
pageY
-
dragElement
.
position
().
top
);
}
else
{
if
((
top
>
54
)
&&
(
bottom
<
(
$
(
window
).
height
()
-
54
)))
dragElement
.
css
(
"top"
,
event
.
pageY
-
coords
.
top
);
if
((
left
>=
54
)
&&
(
right
<
(
$
(
window
).
width
()
-
54
)))
dragElement
.
css
(
"left"
,
event
.
pageX
-
coords
.
left
);
}
}
}
});
});
...
@@ -393,8 +415,8 @@ function checkEmptyFields(field){
...
@@ -393,8 +415,8 @@ function checkEmptyFields(field){
//adding a new task to the page
//adding a new task to the page
function
addTask
(
expression
,
result
){
function
addTask
(
expression
,
result
){
var
lastItem
=
$
(
".editContainer:last"
),
var
lastItem
=
$
(
".editContainer:last"
),
lastItemPos
=
lastItem
.
length
?
lastItem
.
position
().
top
:
45
,
lastItemPos
=
lastItem
.
length
?
lastItem
.
position
().
top
:
45
,
lastItemHeight
=
lastItem
.
length
?
lastItem
.
height
()
:
0
;
lastItemHeight
=
lastItem
.
length
?
lastItem
.
height
()
:
0
;
var
editContent
=
$
(
"<div class='editContainer'>"
).
width
(
240
).
height
(
70
).
css
(
"top"
,
lastItemPos
+
lastItemHeight
+
15
+
"px"
).
appendTo
(
"#data"
);
var
editContent
=
$
(
"<div class='editContainer'>"
).
width
(
240
).
height
(
70
).
css
(
"top"
,
lastItemPos
+
lastItemHeight
+
15
+
"px"
).
appendTo
(
"#data"
);
var
closeItem
=
$
(
"<div class='closeItem'>"
).
appendTo
(
editContent
);
var
closeItem
=
$
(
"<div class='closeItem'>"
).
appendTo
(
editContent
);
var
rightResize
=
$
(
"<div class='rightResize'>"
).
appendTo
(
editContent
);
var
rightResize
=
$
(
"<div class='rightResize'>"
).
appendTo
(
editContent
);
...
@@ -463,4 +485,6 @@ function changeStyle(val){
...
@@ -463,4 +485,6 @@ function changeStyle(val){
$
(
"body, html"
).
addClass
(
"without_radius"
);
$
(
"body, html"
).
addClass
(
"without_radius"
);
break
;
break
;
}
}
if
(
$
(
"#wgt_edit"
).
hasClass
(
"selected"
))
$
(
document
).
enableTextSelect
();
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
resources/library/interactivities/Contraste.wgt/scripts/blackYellow.js
View file @
bcdd655b
...
@@ -23,9 +23,9 @@ var sankoreLang = {
...
@@ -23,9 +23,9 @@ var sankoreLang = {
cancel
:
"Cancel"
,
cancel
:
"Cancel"
,
wgt_name
:
"Contrast"
,
wgt_name
:
"Contrast"
,
reload
:
"Reload"
,
reload
:
"Reload"
,
slate
:
"
W
ood"
,
slate
:
"
w
ood"
,
pad
:
"
P
ad"
,
pad
:
"
p
ad"
,
none
:
"
N
one"
,
none
:
"
n
one"
,
help
:
"Help"
,
help
:
"Help"
,
help_content
:
"This is an example of help content ..."
help_content
:
"This is an example of help content ..."
};
};
...
@@ -88,9 +88,12 @@ function init(){
...
@@ -88,9 +88,12 @@ function init(){
/* ------------- BUTTONS -------------*/
/* ------------- BUTTONS -------------*/
if
(
sankore
.
preference
(
"by_style"
,
""
)){
if
(
window
.
sankore
){
changeStyle
(
sankore
.
preference
(
"by_style"
,
""
));
if
(
sankore
.
preference
(
"by_style"
,
""
)){
$
(
".style_select"
).
val
(
sankore
.
preference
(
"by_style"
,
""
));
changeStyle
(
sankore
.
preference
(
"by_style"
,
""
));
$
(
".style_select"
).
val
(
sankore
.
preference
(
"by_style"
,
""
));
}
else
changeStyle
(
"3"
)
}
else
}
else
changeStyle
(
"3"
)
changeStyle
(
"3"
)
...
@@ -182,10 +185,15 @@ function init(){
...
@@ -182,10 +185,15 @@ function init(){
});
});
$
(
"#wgt_add"
).
click
(
function
(){
$
(
"#wgt_add"
).
click
(
function
(){
shadowDiv
.
show
(
"fast"
,
function
(){
if
(
$
(
"#wgt_help"
).
hasClass
(
"open"
)){
shadowOver
=
true
;
$
(
"#help"
).
slideUp
(
"100"
,
function
(){
popupBack
.
show
(
"slow"
);
$
(
"#wgt_help"
).
removeClass
(
"open"
);
});
$
(
"#data"
).
show
();
});
}
shadowDiv
.
show
();
shadowOver
=
true
;
popupBack
.
show
(
"slow"
);
$
(
document
).
disableTextSelect
();
$
(
document
).
disableTextSelect
();
});
});
...
@@ -203,7 +211,7 @@ function init(){
...
@@ -203,7 +211,7 @@ function init(){
var
rightDiv
=
$
(
"<div id='rightDiv' class='rightDiv'>"
).
appendTo
(
"#data"
);
var
rightDiv
=
$
(
"<div id='rightDiv' class='rightDiv'>"
).
appendTo
(
"#data"
);
//divs for adding a new item
//divs for adding a new item
var
shadowDiv
=
$
(
"<div id='shadowDiv' class='shadowDiv'>"
).
appendTo
(
"
#data
"
);
var
shadowDiv
=
$
(
"<div id='shadowDiv' class='shadowDiv'>"
).
appendTo
(
"
html
"
);
var
popupBack
=
$
(
"<div id='popupBack' class='popupBack'>"
).
appendTo
(
"#data"
);
var
popupBack
=
$
(
"<div id='popupBack' class='popupBack'>"
).
appendTo
(
"#data"
);
//input fields and buttons for a popup window
//input fields and buttons for a popup window
...
@@ -228,25 +236,25 @@ function init(){
...
@@ -228,25 +236,25 @@ function init(){
});
});
cancelButton
.
click
(
function
(){
cancelButton
.
click
(
function
(){
$
(
document
).
enableTextSelect
();
popupBack
.
hide
(
"slow"
,
function
(){
popupBack
.
hide
(
"slow"
,
function
(){
$
(
"#resultText, #expresionText"
).
val
(
""
)
$
(
"#resultText, #expresionText"
).
val
(
""
)
.
css
(
"background-color"
,
"#ffc"
);
.
css
(
"background-color"
,
"#ffc"
);
shadowDiv
.
hide
(
"fast"
);
shadowDiv
.
hide
();
shadowOver
=
false
;
shadowOver
=
false
;
$
(
document
).
enableTextSelect
();
});
});
});
});
okButton
.
click
(
function
(){
okButton
.
click
(
function
(){
$
(
document
).
enableTextSelect
();
if
(
checkEmptyFields
(
expresionText
)
&&
checkEmptyFields
(
resultText
)){
if
(
checkEmptyFields
(
expresionText
)
&&
checkEmptyFields
(
resultText
)){
popupBack
.
hide
(
"slow"
,
function
(){
popupBack
.
hide
(
"slow"
,
function
(){
shadowDiv
.
hide
(
"fast"
);
shadowDiv
.
hide
();
shadowOver
=
false
;
shadowOver
=
false
;
addTask
(
expresionText
.
val
(),
resultText
.
val
());
addTask
(
expresionText
.
val
(),
resultText
.
val
());
exportToSankore
();
exportToSankore
();
$
(
"#resultText, #expresionText"
).
val
(
""
)
$
(
"#resultText, #expresionText"
).
val
(
""
)
.
css
(
"background-color"
,
"#ffc"
);
.
css
(
"background-color"
,
"#ffc"
);
$
(
document
).
enableTextSelect
();
})
})
}
}
});
});
...
@@ -254,11 +262,11 @@ function init(){
...
@@ -254,11 +262,11 @@ function init(){
/* -------------- THE END OF WORK WITH POPUP BUTTONS AND FIELDS ---------------*/
/* -------------- THE END OF WORK WITH POPUP BUTTONS AND FIELDS ---------------*/
// a work with dragging possibility
// a work with dragging possibility
$
(
"input:text
, .style_select
"
).
mouseover
(
function
(){
$
(
"input:text"
).
mouseover
(
function
(){
$
(
document
).
enableTextSelect
();
$
(
document
).
enableTextSelect
();
});
});
$
(
"input:text
, .style_select
"
).
mouseout
(
function
(){
$
(
"input:text"
).
mouseout
(
function
(){
$
(
document
).
disableTextSelect
();
$
(
document
).
disableTextSelect
();
});
});
...
@@ -270,6 +278,8 @@ function init(){
...
@@ -270,6 +278,8 @@ function init(){
resizeObj
.
width
=
$
(
this
).
width
();
resizeObj
.
width
=
$
(
this
).
width
();
resizeObj
.
height
=
$
(
this
).
height
();
resizeObj
.
height
=
$
(
this
).
height
();
}
}
if
(
$
(
"#wgt_display"
).
hasClass
(
"selected"
))
$
(
document
).
disableTextSelect
();
});
});
$
(
".rightResize"
).
live
(
"mousedown"
,
function
(
event
){
$
(
".rightResize"
).
live
(
"mousedown"
,
function
(
event
){
...
@@ -296,13 +306,25 @@ function init(){
...
@@ -296,13 +306,25 @@ function init(){
});
});
$
(
"body"
).
mousemove
(
function
(
event
){
$
(
"body"
).
mousemove
(
function
(
event
){
if
(
dragElement
&&
!
shadowOver
){
if
(
dragElement
&&
!
shadowOver
){
if
(
resizeObj
.
x
)
var
top
=
event
.
pageY
-
coords
.
top
;
dragElement
.
width
(
event
.
pageX
-
dragElement
.
position
().
left
);
var
left
=
event
.
pageX
-
coords
.
left
;
else
if
(
resizeObj
.
y
)
var
bottom
=
top
+
dragElement
.
height
();
dragElement
.
height
(
event
.
pageY
-
dragElement
.
position
().
top
);
var
right
=
left
+
dragElement
.
width
();
else
if
(
resizeObj
.
x
){
dragElement
.
css
(
"top"
,
event
.
pageY
-
coords
.
top
).
css
(
"left"
,
event
.
pageX
-
coords
.
left
);
if
(
right
<
(
$
(
window
).
width
()
-
54
))
dragElement
.
width
(
event
.
pageX
-
dragElement
.
position
().
left
);
}
else
if
(
resizeObj
.
y
){
if
(
bottom
<
(
$
(
window
).
height
()
-
54
))
dragElement
.
height
(
event
.
pageY
-
dragElement
.
position
().
top
);
}
else
{
if
((
top
>
54
)
&&
(
bottom
<
(
$
(
window
).
height
()
-
54
)))
dragElement
.
css
(
"top"
,
event
.
pageY
-
coords
.
top
);
if
((
left
>=
54
)
&&
(
right
<
(
$
(
window
).
width
()
-
54
)))
dragElement
.
css
(
"left"
,
event
.
pageX
-
coords
.
left
);
}
}
}
});
});
...
@@ -375,7 +397,8 @@ function init(){
...
@@ -375,7 +397,8 @@ function init(){
});
});
}
}
}
}
sankore
.
setPreference
(
"blackYellowData"
,
JSON
.
stringify
(
arrayToExport
));
if
(
window
.
sankore
)
sankore
.
setPreference
(
"blackYellowData"
,
JSON
.
stringify
(
arrayToExport
));
}
}
}
}
...
@@ -463,4 +486,6 @@ function changeStyle(val){
...
@@ -463,4 +486,6 @@ function changeStyle(val){
$
(
"body, html"
).
addClass
(
"without_radius"
);
$
(
"body, html"
).
addClass
(
"without_radius"
);
break
;
break
;
}
}
if
(
$
(
"#wgt_edit"
).
hasClass
(
"selected"
))
$
(
document
).
enableTextSelect
();
}
}
This diff is collapsed.
Click to expand it.
src/gui/UBFeaturesActionBar.h
View file @
bcdd655b
...
@@ -42,6 +42,7 @@ public:
...
@@ -42,6 +42,7 @@ public:
~
UBFeaturesActionBar
();
~
UBFeaturesActionBar
();
void
setCurrentState
(
UBFeaturesActionBarState
state
);
void
setCurrentState
(
UBFeaturesActionBarState
state
);
void
cleanText
(){
mSearchBar
->
clear
();
}
signals
:
signals
:
void
searchElement
(
const
QString
&
text
);
void
searchElement
(
const
QString
&
text
);
...
...
This diff is collapsed.
Click to expand it.
src/gui/UBFeaturesWidget.cpp
View file @
bcdd655b
...
@@ -142,6 +142,7 @@ void UBFeaturesWidget::currentSelected(const QModelIndex ¤t)
...
@@ -142,6 +142,7 @@ void UBFeaturesWidget::currentSelected(const QModelIndex ¤t)
centralWidget
->
showElement
(
feature
,
UBFeaturesCentralWidget
::
FeaturePropertiesList
);
centralWidget
->
showElement
(
feature
,
UBFeaturesCentralWidget
::
FeaturePropertiesList
);
mActionBar
->
setCurrentState
(
IN_PROPERTIES
);
mActionBar
->
setCurrentState
(
IN_PROPERTIES
);
}
}
mActionBar
->
cleanText
();
}
}
void
UBFeaturesWidget
::
createNewFolder
()
void
UBFeaturesWidget
::
createNewFolder
()
...
...
This diff is collapsed.
Click to expand it.
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