No regular expressions were active.
|
|
1 |
|
|
|
|
2 |
|
/* * * * M
ain Builde
r Class (P
rofile Fie
lds Manage
r) * * * *
/
|
|
|
3 |
|
|
|
|
4 |
|
function B
xDolPFM( a
Areas ) {
|
|
|
5 |
|
this.c
onfig = {
|
|
|
6 |
|
ar
eas: 0,
|
|
|
7 |
|
pa
rserUrl: '
',
|
|
|
8 |
|
in
activeColu
mns: 4,
|
|
|
9 |
|
ge
tAreaElem
: function
(ind) { //
function t
o get the
area eleme
nt. made t
o customiz
ability
|
|
|
10 |
|
return $
( '#m' + i
nd + ' > d
iv.build_c
ontainer'
).get(0);
|
|
|
11 |
|
}
|
|
|
12 |
|
};
|
|
|
13 |
|
|
|
|
14 |
|
this.a
reas = new
Array();
|
|
|
15 |
|
}
|
|
|
16 |
|
|
|
|
17 |
|
|
|
|
18 |
|
|
|
|
19 |
|
BxDolPFM.p
rototype.i
nit = func
tion() {
|
|
|
20 |
|
//gene
rate areas
|
|
|
21 |
|
while(
this.area
s.length <
this.conf
ig.areas )
{
|
|
|
22 |
|
th
is.areas[t
his.areas.
length] =
new BxDolP
FMArea(thi
s, ( this.
areas.leng
th + 1 ) )
; //we wil
l begin ID
's from 1
!
|
|
|
23 |
|
}
|
|
|
24 |
|
}
|
|
|
25 |
|
|
|
|
26 |
|
BxDolPFM.p
rototype.g
etAreaByID
= functio
n( iAreaID
) {
|
|
|
27 |
|
for( v
ar iAreaIn
d = 0; iAr
eaInd < th
is.areas.l
ength; iAr
eaInd ++ )
|
|
|
28 |
|
if
( this.are
as[iAreaIn
d].id == i
AreaID )
|
|
|
29 |
|
return t
his.areas[
iAreaInd];
|
|
|
30 |
|
|
|
|
31 |
|
return
false;
|
|
|
32 |
|
}
|
|
|
33 |
|
|
|
|
34 |
|
BxDolPFM.p
rototype.u
pdateAreas
= functio
n( sText,
iItemID, s
NewName, i
AreaID ) {
|
|
|
35 |
|
switch
( sText )
{
|
|
|
36 |
|
ca
se 'delete
Item':
|
|
|
37 |
|
location
.reload();
|
|
|
38 |
|
br
eak;
|
|
|
39 |
|
|
|
|
40 |
|
ca
se 'update
Item':
|
|
|
41 |
|
for( var
iAreaInd
= 0; iArea
Ind < this
.areas.len
gth; iArea
Ind ++ )
|
|
|
42 |
|
this
.areas[iAr
eaInd].get
ItemOrBloc
kByID( iIt
emID ).upd
ateName( s
NewName );
|
|
|
43 |
|
br
eak;
|
|
|
44 |
|
|
|
|
45 |
|
ca
se 'newBlo
ck':
|
|
|
46 |
|
if( !iIt
emID ) {
|
|
|
47 |
|
aler
t( 'Sorry
couldn\'t
insert new
block. Pl
ease check
if NEW BL
OCK alread
y exists.'
);
|
|
|
48 |
|
this
.getAreaBy
ID( iAreaI
D ).moveFa
keBlockBac
k();
|
|
|
49 |
|
} else {
|
|
|
50 |
|
for(
var iArea
Ind = 0; i
AreaInd <
this.areas
.length; i
AreaInd ++
) {
|
|
|
51 |
|
var oArea
= this.are
as[iAreaIn
d];
|
|
|
52 |
|
|
|
|
53 |
|
oArea.inse
rtNewBlock
( iItemID
);
|
|
|
54 |
|
oArea.move
FakeBlockB
ack();
|
|
|
55 |
|
|
|
|
56 |
|
if( oArea.
id == iAre
aID )
|
|
|
57 |
|
oArea.
resortAndS
ubmit();
|
|
|
58 |
|
else
|
|
|
59 |
|
oArea.
resortArra
ys(); // d
o not subm
it positio
ns for oth
er areas
|
|
|
60 |
|
}
|
|
|
61 |
|
}
|
|
|
62 |
|
br
eak;
|
|
|
63 |
|
|
|
|
64 |
|
ca
se 'newIte
m':
|
|
|
65 |
|
if( !iIt
emID ) {
|
|
|
66 |
|
aler
t( 'Sorry
couldn\'t
insert new
item. Ple
ase check
if NEW_ITE
M already
exists.' )
;
|
|
|
67 |
|
this
.getAreaBy
ID( iAreaI
D ).moveFa
keItemBack
();
|
|
|
68 |
|
} else {
|
|
|
69 |
|
for(
var iArea
Ind = 0; i
AreaInd <
this.areas
.length; i
AreaInd ++
) {
|
|
|
70 |
|
var oArea
= this.are
as[iAreaIn
d];
|
|
|
71 |
|
|
|
|
72 |
|
oArea.inse
rtNewItem(
iItemID )
;
|
|
|
73 |
|
oArea.move
FakeItemBa
ck();
|
|
|
74 |
|
|
|
|
75 |
|
if( oArea.
id == iAre
aID )
|
|
|
76 |
|
oArea.
resortAndS
ubmit();
|
|
|
77 |
|
else
|
|
|
78 |
|
oArea.
resortArra
ys(); // d
o not subm
it positio
ns for oth
er areas
|
|
|
79 |
|
}
|
|
|
80 |
|
}
|
|
|
81 |
|
br
eak;
|
|
|
82 |
|
}
|
|
|
83 |
|
}
|
|
|
84 |
|
|
|
|
85 |
|
|
|
|
86 |
|
|
|
|
87 |
|
|
|
|
88 |
|
/* * * * A
rea Class
* * * */
|
|
|
89 |
|
|
|
|
90 |
|
function B
xDolPFMAre
a(parent,
id) {
|
|
|
91 |
|
this.i
d
=
id;
|
|
|
92 |
|
this.p
arent
=
parent;
|
|
|
93 |
|
|
|
|
94 |
|
this.a
ctive_bloc
ks =
new Array(
);
|
|
|
95 |
|
this.i
nactive_bl
ocks =
new Array(
);
|
|
|
96 |
|
this.a
ctive_item
s =
new Array(
);
|
|
|
97 |
|
this.i
nactive_it
ems =
new Array(
);
|
|
|
98 |
|
|
|
|
99 |
|
this.a
ctiveZoneE
lemID
= 'are
a_' + this
.id + '_ac
tive'
|
|
|
100 |
|
this.i
nactiveIte
msZoneElem
ID = 'are
a_' + this
.id + '_it
ems_inacti
ve'
|
|
|
101 |
|
this.i
nactiveBlo
cksZoneEle
mID = 'are
a_' + this
.id + '_bl
ocks_inact
ive'
|
|
|
102 |
|
|
|
|
103 |
|
this.g
etElement(
id );
|
|
|
104 |
|
this.r
equestData
();
|
|
|
105 |
|
}
|
|
|
106 |
|
|
|
|
107 |
|
BxDolPFMAr
ea.prototy
pe.getElem
ent = func
tion() {
|
|
|
108 |
|
this.e
lement = t
his.parent
.config.ge
tAreaElem(
this.id )
;
|
|
|
109 |
|
}
|
|
|
110 |
|
|
|
|
111 |
|
BxDolPFMAr
ea.prototy
pe.request
Data = fun
ction() {
|
|
|
112 |
|
var oT
hisArea =
this;
|
|
|
113 |
|
$.getJ
SON(
|
|
|
114 |
|
th
is.parent.
config.par
serUrl,
|
|
|
115 |
|
{a
ction: 'ge
tArea', id
: this.id}
,
|
|
|
116 |
|
fu
nction(oAr
eaData){
|
|
|
117 |
|
oThisAre
a.getData(
oAreaData)
;
|
|
|
118 |
|
}
|
|
|
119 |
|
);
|
|
|
120 |
|
}
|
|
|
121 |
|
|
|
|
122 |
|
BxDolPFMAr
ea.prototy
pe.getData
= functio
n(oAreaDat
a) {
|
|
|
123 |
|
if( th
is.id != o
AreaData.i
d )
|
|
|
124 |
|
re
turn false
;
|
|
|
125 |
|
|
|
|
126 |
|
for( v
ar iBlockI
nd = 0; iB
lockInd <
oAreaData.
active_blo
cks.length
; iBlock
Ind++ )
this.acti
ve_blocks[
this.ac
tive_block
s.length
] = new B
xDolPFMBlo
ck( this,
oAreaData.
active_blo
cks[ iBl
ockInd ] )
;
|
|
|
127 |
|
for( v
ar iBlockI
nd = 0; iB
lockInd <
oAreaData.
inactive_b
locks.leng
th; iBlock
Ind++ )
this.inac
tive_block
s[ this.in
active_blo
cks.length
] = new B
xDolPFMBlo
ck( this,
oAreaData.
inactive_b
locks[ iBl
ockInd ] )
;
|
|
|
128 |
|
for( v
ar iItemIn
d = 0; iI
temInd <
oAreaData.
active_ite
ms.length;
iItemI
nd ++ )
this.acti
ve_items[
this.ac
tive_items
.length
] = new B
xDolPFMIte
m( this,
oAreaData.
active_ite
ms[ iIt
emInd ] )
;
|
|
|
129 |
|
for( v
ar iItemIn
d = 0; iI
temInd <
oAreaData.
inactive_i
tems.lengt
h; iItemI
nd ++ )
this.inac
tive_items
[ this.in
active_ite
ms.length
] = new B
xDolPFMIte
m( this,
oAreaData.
inactive_i
tems[ iIt
emInd ] )
;
|
|
|
130 |
|
|
|
|
131 |
|
this.d
raw();
|
|
|
132 |
|
}
|
|
|
133 |
|
|
|
|
134 |
|
BxDolPFMAr
ea.prototy
pe.draw =
function()
{
|
|
|
135 |
|
$( thi
s.element
).html( ''
); //clea
r element
|
|
|
136 |
|
$( thi
s.element
).append(
|
|
|
137 |
|
'<
div class=
"build_zon
e_header">
Active Ite
ms</div>'
+
|
|
|
138 |
|
'<
div class=
"blocks_co
nt_bord">'
+
|
|
|
139 |
|
'<div cl
ass="block
s_containe
r" id="' +
this.acti
veZoneElem
ID + '">'
+
|
|
|
140 |
|
'<di
v class="b
uild_block
_fake"></d
iv>' +
|
|
|
141 |
|
'</div>'
+
|
|
|
142 |
|
'<
/div>' +
|
|
|
143 |
|
'<
br style="
height:20p
x;clear:bo
th;" />' +
|
|
|
144 |
|
'<
div class=
"build_zon
e_header">
Inactive B
locks</div
>' +
|
|
|
145 |
|
'<
div class=
"blocks_co
nt_bord">'
+
|
|
|
146 |
|
'<div cl
ass="block
s_containe
r" id="' +
this.inac
tiveBlocks
ZoneElemID
+ '">' +
|
|
|
147 |
|
'<di
v class="b
uild_block
_fake"></d
iv>' +
|
|
|
148 |
|
'</div>'
+
|
|
|
149 |
|
'<
/div>' +
|
|
|
150 |
|
'<
br style="
height:20p
x;clear:bo
th;" />' +
|
|
|
151 |
|
'<
div class=
"build_zon
e_header">
Inactive I
tems</div>
' +
|
|
|
152 |
|
'<
div class=
"blocks_co
nt_bord bu
ild_block_
inactive_i
tems">' +
|
|
|
153 |
|
'<div cl
ass="block
s_containe
r" id="' +
this.inac
tiveItemsZ
oneElemID
+ '">' +
|
|
|
154 |
|
'<di
v class="b
uild_inac_
items_col"
id="build
_inac_item
s_area_' +
this.id +
'_col_1">
' +
|
|
|
155 |
|
'<div clas
s="build_i
tem_fake">
</div>' +
|
|
|
156 |
|
'</d
iv>' +
|
|
|
157 |
|
'<di
v class="b
uild_inac_
items_col"
id="build
_inac_item
s_area_' +
this.id +
'_col_2">
' +
|
|
|
158 |
|
'<div clas
s="build_i
tem_fake">
</div>' +
|
|
|
159 |
|
'</d
iv>' +
|
|
|
160 |
|
'<di
v class="b
uild_inac_
items_col"
id="build
_inac_item
s_area_' +
this.id +
'_col_3">
' +
|
|
|
161 |
|
'<div clas
s="build_i
tem_fake">
</div>' +
|
|
|
162 |
|
'</d
iv>' +
|
|
|
163 |
|
'<di
v class="b
uild_inac_
items_col"
id="build
_inac_item
s_area_' +
this.id +
'_col_4">
' +
|
|
|
164 |
|
'<div clas
s="build_i
tem_fake">
</div>' +
|
|
|
165 |
|
'</d
iv>' +
|
|
|
166 |
|
'<di
v class="b
uild_inac_
items_col"
id="build
_inac_item
s_area_' +
this.id +
'_col_5">
' +
|
|
|
167 |
|
'<div clas
s="build_i
tem_fake">
</div>' +
|
|
|
168 |
|
'</d
iv>' +
|
|
|
169 |
|
'</div>'
+
|
|
|
170 |
|
'<
/div>'
|
|
|
171 |
|
);
|
|
|
172 |
|
|
|
|
173 |
|
this.a
ctiveZoneE
lement
= $(
'#' + this
.activeZon
eElemID
).ge
t(0);
|
|
|
174 |
|
this.i
nactiveBlo
cksZoneEle
ment = $(
'#' + this
.inactiveB
locksZoneE
lemID ).ge
t(0);
|
|
|
175 |
|
this.i
nactiveIte
msZoneElem
ent = $(
'#' + this
.inactiveI
temsZoneEl
emID ).ge
t(0);
|
|
|
176 |
|
|
|
|
177 |
|
//draw
all activ
e blocks
|
|
|
178 |
|
for( v
ar iBlockI
nd = 0; iB
lockInd <
this.activ
e_blocks.l
ength; iBl
ockInd ++
) {
|
|
|
179 |
|
th
is.active_
blocks[iBl
ockInd].dr
aw( this.a
ctiveZoneE
lement );
|
|
|
180 |
|
|
|
|
181 |
|
//
draw subit
ems of blo
ck
|
|
|
182 |
|
fo
r( var iIt
emInd = 0;
iItemInd
< this.act
ive_items.
length; iI
temInd ++
)
|
|
|
183 |
|
if( this
.active_it
ems[iItemI
nd].block
== this.ac
tive_block
s[iBlockIn
d].id )
|
|
|
184 |
|
this
.active_it
ems[iItemI
nd].draw(
this.activ
e_blocks[i
BlockInd].
element );
|
|
|
185 |
|
}
|
|
|
186 |
|
|
|
|
187 |
|
//appe
nd NEW BLO
CK element
|
|
|
188 |
|
$( thi
s.inactive
BlocksZone
Element ).
append(
|
|
|
189 |
|
'<
div class=
"build_blo
ck" id="bu
ild_block_
new_' + th
is.id + '"
>' +
|
|
|
190 |
|
'<div cl
ass="build
_block_hea
der">NEW B
LOCK</div>
' +
|
|
|
191 |
|
'<
/div>'
|
|
|
192 |
|
);
|
|
|
193 |
|
|
|
|
194 |
|
//appe
nd all ina
ctive bloc
ks
|
|
|
195 |
|
for( v
ar iBlockI
nd = 0; iB
lockInd <
this.inact
ive_blocks
.length; i
BlockInd +
+ )
|
|
|
196 |
|
th
is.inactiv
e_blocks[i
BlockInd].
draw( this
.inactiveB
locksZoneE
lement );
|
|
|
197 |
|
|
|
|
198 |
|
//appe
nd NEW_ITE
M element
|
|
|
199 |
|
$( '#b
uild_inac_
items_area
_' + this.
id + '_col
_1' ).appe
nd(
|
|
|
200 |
|
'<
div class=
"build_ite
m_active"
id="build_
item_new_'
+ this.id
+ '">NEW_
ITEM</div>
'
|
|
|
201 |
|
);
|
|
|
202 |
|
|
|
|
203 |
|
//appe
nd all ina
ctive item
s to 5 col
umns
|
|
|
204 |
|
var iC
olCount =
2;
|
|
|
205 |
|
for( v
ar iItemIn
d = 0; iIt
emInd < th
is.inactiv
e_items.le
ngth; iIte
mInd ++ )
{
|
|
|
206 |
|
th
is.inactiv
e_items[iI
temInd].dr
aw(
|
|
|
207 |
|
$( '#bui
ld_inac_it
ems_area_'
+ this.id
+ '_col_'
+ iColCou
nt++ ).get
(0)
|
|
|
208 |
|
);
|
|
|
209 |
|
|
|
|
210 |
|
if
( iColCoun
t > 5 ) iC
olCount =
1;
|
|
|
211 |
|
}
|
|
|
212 |
|
|
|
|
213 |
|
$( thi
s.activeZo
neElement
).
append( '<
div class=
"clear_bot
h"></div>'
);
|
|
|
214 |
|
$( thi
s.inactive
BlocksZone
Element ).
append( '<
div class=
"clear_bot
h"></div>'
);
|
|
|
215 |
|
$( thi
s.inactive
ItemsZoneE
lement ).
append( '<
div class=
"clear_bot
h"></div>'
);
|
|
|
216 |
|
|
|
|
217 |
|
this.f
ixZonesWid
ths();
|
|
|
218 |
|
this.a
ctivateSor
table();
|
|
|
219 |
|
}
|
|
|
220 |
|
|
|
|
221 |
|
BxDolPFMAr
ea.prototy
pe.fixZone
sWidths =
function()
{
|
|
|
222 |
|
if( th
is.active_
blocks.len
gth ) {
|
|
|
223 |
|
//
fix active
area
|
|
|
224 |
|
va
r el = $(
this.activ
e_blocks[0
].element
);
|
|
|
225 |
|
|
|
|
226 |
|
va
r w1 = par
seInt( el.
css( 'widt
h'
) ) | 0;
|
|
|
227 |
|
va
r w2 = par
seInt( el.
css( 'marg
in-left'
) ) | 0;
|
|
|
228 |
|
va
r w3 = par
seInt( el.
css( 'marg
in-right'
) ) | 0;
|
|
|
229 |
|
va
r w = ( w1
+ w2 + w3
) * ( thi
s.active_b
locks.leng
th + 1 ) +
20;
|
|
|
230 |
|
$(
this.acti
veZoneElem
ent ).pare
nt().width
( w );
|
|
|
231 |
|
}
|
|
|
232 |
|
|
|
|
233 |
|
if( th
is.inactiv
e_blocks.l
ength ) {
|
|
|
234 |
|
//
fix inacti
ve area
|
|
|
235 |
|
va
r el = $(
this.inact
ive_blocks
[0].elemen
t );
|
|
|
236 |
|
|
|
|
237 |
|
va
r w1 = par
seInt( el.
css( 'widt
h'
) ) | 0;
|
|
|
238 |
|
va
r w2 = par
seInt( el.
css( 'marg
in-left'
) ) | 0;
|
|
|
239 |
|
va
r w3 = par
seInt( el.
css( 'marg
in-right'
) ) | 0;
|
|
|
240 |
|
va
r w = ( w1
+ w2 + w3
) * ( thi
s.inactive
_blocks.le
ngth + 2 )
+ 20;
|
|
|
241 |
|
$(
this.inac
tiveBlocks
ZoneElemen
t ).parent
().width(
w );
|
|
|
242 |
|
}
|
|
|
243 |
|
}
|
|
|
244 |
|
|
|
|
245 |
|
|
|
|
246 |
|
BxDolPFMAr
ea.prototy
pe.activat
eSortable
= function
() {
|
|
|
247 |
|
var oT
hisArea =
this;
|
|
|
248 |
|
|
|
|
249 |
|
this.s
ortableIns
tanceBlock
s = $( thi
s.element
).sortable
({
|
|
|
250 |
|
it
ems: 'div.
build_bloc
k,div.buil
d_block_fa
ke',
|
|
|
251 |
|
ho
verClass:
'build_blo
ck_hover',
|
|
|
252 |
|
st
op: functi
on(a,b){
|
|
|
253 |
|
oThisAre
a.stopItem
sSort( thi
s.id );
|
|
|
254 |
|
}
|
|
|
255 |
|
}).sor
tableInsta
nce(); //c
reate inst
ance for d
estroying
possibilit
ies
|
|
|
256 |
|
|
|
|
257 |
|
this.s
ortableIns
tanceItems
= $( this
.element )
.sortable(
{
|
|
|
258 |
|
it
ems: 'div.
build_item
_active,di
v.build_it
em_inactiv
e,div.buil
d_item_fak
e',
|
|
|
259 |
|
ho
verClass:
'build_ite
m_hover',
|
|
|
260 |
|
st
op: functi
on(a,b){
|
|
|
261 |
|
oThisAre
a.stopItem
sSort( thi
s.id );
|
|
|
262 |
|
}
|
|
|
263 |
|
}).sor
tableInsta
nce();
|
|
|
264 |
|
}
|
|
|
265 |
|
|
|
|
266 |
|
BxDolPFMAr
ea.prototy
pe.deactiv
ateSortabl
e = functi
on() {
|
|
|
267 |
|
this.s
ortableIns
tanceBlock
s.destroy(
);
|
|
|
268 |
|
this.s
ortableIns
tanceItems
.destroy()
;
|
|
|
269 |
|
}
|
|
|
270 |
|
|
|
|
271 |
|
BxDolPFMAr
ea.prototy
pe.stopIte
msSort = f
unction( d
raggedElem
entID ) {
|
|
|
272 |
|
if( dr
aggedEleme
ntID == 'b
uild_block
_new_' + t
his.id ) {
|
|
|
273 |
|
if
( $( '#bui
ld_block_n
ew_' + thi
s.id ).par
ent().is(
'#' + this
.activeZon
eElemID )
)
|
|
|
274 |
|
this.cre
ateNewBloc
k();
|
|
|
275 |
|
}
|
|
|
276 |
|
else i
f( dragged
ElementID
== 'build_
item_new_'
+ this.id
){
|
|
|
277 |
|
if
( $( '#bui
ld_item_ne
w_' + this
.id ).pare
nts('#' +
this.activ
eZoneElemI
D).length
)
|
|
|
278 |
|
this.cre
ateNewItem
();
|
|
|
279 |
|
}
|
|
|
280 |
|
else
|
|
|
281 |
|
th
is.resortA
ndSubmit()
;
|
|
|
282 |
|
}
|
|
|
283 |
|
|
|
|
284 |
|
BxDolPFMAr
ea.prototy
pe.resortA
ndSubmit =
function(
){
|
|
|
285 |
|
var oT
hisArea =
this;
|
|
|
286 |
|
|
|
|
287 |
|
setTim
eout( func
tion() {
|
|
|
288 |
|
oT
hisArea.re
sortArrays
();
|
|
|
289 |
|
oT
hisArea.su
bmitPositi
ons();
|
|
|
290 |
|
}, 550
);
|
|
|
291 |
|
}
|
|
|
292 |
|
|
|
|
293 |
|
BxDolPFMAr
ea.prototy
pe.createN
ewBlock =
function()
{
|
|
|
294 |
|
var oT
hisArea =
this;
|
|
|
295 |
|
|
|
|
296 |
|
$.getJ
SON(
|
|
|
297 |
|
th
is.parent.
config.par
serUrl,
|
|
|
298 |
|
{a
ction: 'cr
eateNewBlo
ck'},
|
|
|
299 |
|
fu
nction(oAr
eaData){
|
|
|
300 |
|
oThisAre
a.parent.u
pdateAreas
( 'newBloc
k', oAreaD
ata.id, ''
, oThisAre
a.id );
|
|
|
301 |
|
}
|
|
|
302 |
|
);
|
|
|
303 |
|
}
|
|
|
304 |
|
|
|
|
305 |
|
BxDolPFMAr
ea.prototy
pe.createN
ewItem = f
unction()
{
|
|
|
306 |
|
var oT
hisArea =
this;
|
|
|
307 |
|
|
|
|
308 |
|
$.getJ
SON(
|
|
|
309 |
|
th
is.parent.
config.par
serUrl,
|
|
|
310 |
|
{a
ction: 'cr
eateNewIte
m'},
|
|
|
311 |
|
fu
nction(oAr
eaData){
|
|
|
312 |
|
oThisAre
a.parent.u
pdateAreas
( 'newItem
', oAreaDa
ta.id, '',
oThisArea
.id );
|
|
|
313 |
|
}
|
|
|
314 |
|
);
|
|
|
315 |
|
}
|
|
|
316 |
|
|
|
|
317 |
|
BxDolPFMAr
ea.prototy
pe.insertN
ewBlock =
function(
newBlockID
) {
|
|
|
318 |
|
|
|
|
319 |
|
var iN
ewInd = th
is.active_
blocks.len
gth;
|
|
|
320 |
|
var oN
ewBlockDat
a = {id:ne
wBlockID,n
ame:'NEW B
LOCK'};
|
|
|
321 |
|
var oT
hisArea =
this;
|
|
|
322 |
|
|
|
|
323 |
|
//crea
te object
|
|
|
324 |
|
this.a
ctive_bloc
ks[iNewInd
] = new Bx
DolPFMBloc
k( this, o
NewBlockDa
ta );
|
|
|
325 |
|
var oN
ewBlock =
this.activ
e_blocks[i
NewInd];
|
|
|
326 |
|
|
|
|
327 |
|
//inse
rt before
fake NEW B
LOCK eleme
nt
|
|
|
328 |
|
$( oNe
wBlock.get
Code() ).i
nsertBefor
e( '#build
_block_new
_' + this.
id );
|
|
|
329 |
|
|
|
|
330 |
|
//atta
ch onclick
event for
link
|
|
|
331 |
|
$( '#'
+ oNewBlo
ck.element
ID + ' > d
iv.build_b
lock_heade
r' ).child
ren( 'a' )
.click( fu
nction(){
|
|
|
332 |
|
oT
hisArea.op
enFieldDia
log( oNewB
lock.id, o
ThisArea.i
d );
|
|
|
333 |
|
} );
|
|
|
334 |
|
|
|
|
335 |
|
//get
element
|
|
|
336 |
|
oNewBl
ock.getEle
ment();
|
|
|
337 |
|
|
|
|
338 |
|
this.d
eactivateS
ortable();
|
|
|
339 |
|
this.a
ctivateSor
table();
|
|
|
340 |
|
}
|
|
|
341 |
|
|
|
|
342 |
|
BxDolPFMAr
ea.prototy
pe.insertN
ewItem = f
unction( n
ewItemID )
{
|
|
|
343 |
|
var iN
ewInd = th
is.active_
items.leng
th;
|
|
|
344 |
|
var oN
ewItemData
= {id:new
ItemID,nam
e:'NEW_ITE
M'};
|
|
|
345 |
|
var oT
hisArea =
this;
|
|
|
346 |
|
|
|
|
347 |
|
//crea
te object
|
|
|
348 |
|
this.a
ctive_item
s[iNewInd]
= new BxD
olPFMItem(
this, oNe
wItemData
);
|
|
|
349 |
|
var oN
ewItem = t
his.active
_items[iNe
wInd];
|
|
|
350 |
|
|
|
|
351 |
|
//inse
rt before
fake NEW_I
TEM elemen
t
|
|
|
352 |
|
$( oNe
wItem.getC
ode() ).in
sertBefore
( '#build_
item_new_'
+ this.id
);
|
|
|
353 |
|
|
|
|
354 |
|
//atta
ch onclick
event for
link
|
|
|
355 |
|
$( '#'
+ oNewIte
m.elementI
D ).childr
en( 'a' ).
click( fun
ction(){
|
|
|
356 |
|
oT
hisArea.op
enFieldDia
log( oNewI
tem.id, oT
hisArea.id
);
|
|
|
357 |
|
} );
|
|
|
358 |
|
|
|
|
359 |
|
//get
element
|
|
|
360 |
|
this.a
ctive_item
s[iNewInd]
.getElemen
t();
|
|
|
361 |
|
|
|
|
362 |
|
this.d
eactivateS
ortable();
|
|
|
363 |
|
this.a
ctivateSor
table();
|
|
|
364 |
|
}
|
|
|
365 |
|
|
|
|
366 |
|
BxDolPFMAr
ea.prototy
pe.moveFak
eBlockBack
= functio
n() {
|
|
|
367 |
|
$( '#b
uild_block
_new_' + t
his.id ).p
rependTo(
this.inact
iveBlocksZ
oneElement
);
|
|
|
368 |
|
}
|
|
|
369 |
|
|
|
|
370 |
|
BxDolPFMAr
ea.prototy
pe.moveFak
eItemBack
= function
() {
|
|
|
371 |
|
$( '#b
uild_item_
new_' + th
is.id ).pr
ependTo( '
#build_ina
c_items_ar
ea_' + thi
s.id + '_c
ol_1' );
|
|
|
372 |
|
}
|
|
|
373 |
|
|
|
|
374 |
|
BxDolPFMAr
ea.prototy
pe.resortA
rrays = fu
nction() {
|
|
|
375 |
|
var oT
hisArea =
this;
|
|
|
376 |
|
|
|
|
377 |
|
var aN
ewBlocks
= new A
rray();
|
|
|
378 |
|
var aN
ewBlocksIn
ac = new A
rray();
|
|
|
379 |
|
var aN
ewItems
= new A
rray();
|
|
|
380 |
|
var aN
ewItemsIna
c = new A
rray();
|
|
|
381 |
|
|
|
|
382 |
|
//get
active blo
cks
|
|
|
383 |
|
$( '#'
+ this.ac
tiveZoneEl
emID + ' .
build_bloc
k' ).each(
function(
ind, eBlo
ck ){
|
|
|
384 |
|
va
r oBlock =
oThisArea
.getBlockB
yElementID
( eBlock.i
d );
|
|
|
385 |
|
if
( !oBlock
|| $( eBlo
ck ).css('
visibility
') == 'hid
den' ) ret
urn; //jus
t in case
|
|
|
386 |
|
aN
ewBlocks.p
ush( oBloc
k );
|
|
|
387 |
|
|
|
|
388 |
|
//
get active
items of
this block
|
|
|
389 |
|
$(
'#' + oBl
ock.elemen
tID + ' .b
uild_item_
active' ).
each( func
tion( ind,
eItem ){
|
|
|
390 |
|
var oIte
m = oThisA
rea.getIte
mByElement
ID( eItem.
id );
|
|
|
391 |
|
if( !oIt
em || $( e
Item ).css
('visibili
ty') == 'h
idden' ) r
eturn; //i
t can be f
ake NEW_IT
EM
|
|
|
392 |
|
oItem.bl
ock = oBlo
ck.id; //s
et parent
block
|
|
|
393 |
|
aNewItem
s.push( oI
tem );
|
|
|
394 |
|
})
;
|
|
|
395 |
|
});
|
|
|
396 |
|
|
|
|
397 |
|
//get
inactive b
locks
|
|
|
398 |
|
$( '#'
+ this.in
activeBloc
ksZoneElem
ID + ' .bu
ild_block'
).each( f
unction( i
nd, eBlock
){
|
|
|
399 |
|
va
r oBlock =
oThisArea
.getBlockB
yElementID
( eBlock.i
d );
|
|
|
400 |
|
if
( !oBlock
|| $( eBlo
ck ).css('
visibility
') == 'hid
den' ) ret
urn;
|
|
|
401 |
|
aN
ewBlocksIn
ac.push( o
Block );
|
|
|
402 |
|
});
|
|
|
403 |
|
|
|
|
404 |
|
//get
inactive i
tems from
blocks zon
e
|
|
|
405 |
|
$( '#'
+ this.in
activeBloc
ksZoneElem
ID + ' .bu
ild_item_a
ctive' ).e
ach( funct
ion( ind,
eItem ){
|
|
|
406 |
|
va
r oItem =
oThisArea.
getItemByE
lementID(
eItem.id )
;
|
|
|
407 |
|
if
( !oItem |
| $( eItem
).css('vi
sibility')
== 'hidde
n' ) retur
n;
|
|
|
408 |
|
oI
tem.block
= 0;
|
|
|
409 |
|
aN
ewItemsIna
c.push( oI
tem );
|
|
|
410 |
|
});
|
|
|
411 |
|
|
|
|
412 |
|
//get
inactive i
tems from
items zone
|
|
|
413 |
|
$( '#'
+ this.in
activeItem
sZoneElemI
D + ' .bui
ld_item_ac
tive' ).ea
ch( functi
on( ind, e
Item ){
|
|
|
414 |
|
va
r oItem =
oThisArea.
getItemByE
lementID(
eItem.id )
;
|
|
|
415 |
|
if
( !oItem |
| $( eItem
).css('vi
sibility')
== 'hidde
n' ) retur
n;
|
|
|
416 |
|
oI
tem.block
= 0;
|
|
|
417 |
|
aN
ewItemsIna
c.push( oI
tem );
|
|
|
418 |
|
});
|
|
|
419 |
|
|
|
|
420 |
|
this.a
ctive_bloc
ks = aNe
wBlocks;
|
|
|
421 |
|
this.i
nactive_bl
ocks = aNe
wBlocksIna
c;
|
|
|
422 |
|
this.a
ctive_item
s = aNe
wItems;
|
|
|
423 |
|
this.i
nactive_it
ems = aNe
wItemsInac
;
|
|
|
424 |
|
|
|
|
425 |
|
this.f
ixZonesWid
ths();
|
|
|
426 |
|
}
|
|
|
427 |
|
|
|
|
428 |
|
BxDolPFMAr
ea.prototy
pe.submitP
ositions =
function(
){
|
|
|
429 |
|
var oR
equest = {
};
|
|
|
430 |
|
|
|
|
431 |
|
for( v
ar iBlockI
nd = 0; iB
lockInd <
this.activ
e_blocks.l
ength; iBl
ockInd ++
) {
|
|
|
432 |
|
oR
equest['bl
ocks[' + i
BlockInd +
']'] = th
is.active_
blocks[iBl
ockInd].id
;
|
|
|
433 |
|
}
|
|
|
434 |
|
|
|
|
435 |
|
for( v
ar iItemIn
d = 0; iIt
emInd < th
is.active_
items.leng
th; iItemI
nd ++ ) {
|
|
|
436 |
|
oR
equest['it
ems[' + iI
temInd + '
]'] = this
.active_it
ems[iItemI
nd].id;
|
|
|
437 |
|
oR
equest['it
ems_blocks
[' + this.
active_ite
ms[iItemIn
d].id + ']
'] = this.
active_ite
ms[iItemIn
d].block;
|
|
|
438 |
|
}
|
|
|
439 |
|
|
|
|
440 |
|
oReque
st.action
= 'savePos
itions';
|
|
|
441 |
|
oReque
st.id = th
is.id;
|
|
|
442 |
|
|
|
|
443 |
|
var oT
hisArea =
this;
|
|
|
444 |
|
$.post
( this.par
ent.config
.parserUrl
, oRequest
, function
(sResult){
oThisArea.
processSav
eResult(sR
esult);} )
;
|
|
|
445 |
|
}
|
|
|
446 |
|
|
|
|
447 |
|
BxDolPFMAr
ea.prototy
pe.process
SaveResult
= functio
n( sResult
) {
|
|
|
448 |
|
if( $.
trim( sRes
ult ) != '
OK' )
|
|
|
449 |
|
al
ert( sResu
lt );
|
|
|
450 |
|
}
|
|
|
451 |
|
|
|
|
452 |
|
BxDolPFMAr
ea.prototy
pe.getBloc
kByElement
ID = funct
ion( getID
) {
|
|
|
453 |
|
for( v
ar iBlockI
nd = 0; iB
lockInd <
this.activ
e_blocks.l
ength; iBl
ockInd ++
)
|
|
|
454 |
|
if
( this.act
ive_blocks
[iBlockInd
].elementI
D == getID
)
|
|
|
455 |
|
return t
his.active
_blocks[iB
lockInd];
|
|
|
456 |
|
|
|
|
457 |
|
for( v
ar iBlockI
nd = 0; iB
lockInd <
this.inact
ive_blocks
.length; i
BlockInd +
+ )
|
|
|
458 |
|
if
( this.ina
ctive_bloc
ks[iBlockI
nd].elemen
tID == get
ID )
|
|
|
459 |
|
return t
his.inacti
ve_blocks[
iBlockInd]
;
|
|
|
460 |
|
|
|
|
461 |
|
return
false;
|
|
|
462 |
|
}
|
|
|
463 |
|
|
|
|
464 |
|
BxDolPFMAr
ea.prototy
pe.getItem
ByElementI
D = functi
on( getID
) {
|
|
|
465 |
|
for( v
ar iItemIn
d = 0; iIt
emInd < th
is.active_
items.leng
th; iItemI
nd ++ )
|
|
|
466 |
|
if
( this.act
ive_items[
iItemInd].
elementID
== getID )
|
|
|
467 |
|
return t
his.active
_items[iIt
emInd];
|
|
|
468 |
|
|
|
|
469 |
|
for( v
ar iItemIn
d = 0; iIt
emInd < th
is.inactiv
e_items.le
ngth; iIte
mInd ++ )
|
|
|
470 |
|
if
( this.ina
ctive_item
s[iItemInd
].elementI
D == getID
)
|
|
|
471 |
|
return t
his.inacti
ve_items[i
ItemInd];
|
|
|
472 |
|
|
|
|
473 |
|
return
false;
|
|
|
474 |
|
}
|
|
|
475 |
|
|
|
|
476 |
|
BxDolPFMAr
ea.prototy
pe.getItem
OrBlockByI
D = functi
on( getID
) {
|
|
|
477 |
|
//sear
ch in acti
ve items
|
|
|
478 |
|
for( v
ar iItemIn
d = 0; iIt
emInd < th
is.active_
items.leng
th; iItemI
nd ++ )
|
|
|
479 |
|
if
( this.act
ive_items[
iItemInd].
id == getI
D )
|
|
|
480 |
|
return t
his.active
_items[iIt
emInd];
|
|
|
481 |
|
|
|
|
482 |
|
//sear
ch in inac
tive items
|
|
|
483 |
|
for( v
ar iItemIn
d = 0; iIt
emInd < th
is.inactiv
e_items.le
ngth; iIte
mInd ++ )
|
|
|
484 |
|
if
( this.ina
ctive_item
s[iItemInd
].id == ge
tID )
|
|
|
485 |
|
return t
his.inacti
ve_items[i
ItemInd];
|
|
|
486 |
|
|
|
|
487 |
|
//sear
ch in acti
ve blocks
|
|
|
488 |
|
for( v
ar iBlockI
nd = 0; iB
lockInd <
this.activ
e_blocks.l
ength; iBl
ockInd ++
)
|
|
|
489 |
|
if
( this.act
ive_blocks
[iBlockInd
].id == ge
tID )
|
|
|
490 |
|
return t
his.active
_blocks[iB
lockInd];
|
|
|
491 |
|
|
|
|
492 |
|
//sear
ch in inac
tive block
s
|
|
|
493 |
|
for( v
ar iBlockI
nd = 0; iB
lockInd <
this.inact
ive_blocks
.length; i
BlockInd +
+ )
|
|
|
494 |
|
if
( this.ina
ctive_bloc
ks[iBlockI
nd].id ==
getID )
|
|
|
495 |
|
return t
his.inacti
ve_blocks[
iBlockInd]
;
|
|
|
496 |
|
|
|
|
497 |
|
return
false;
|
|
|
498 |
|
}
|
|
|
499 |
|
|
|
|
500 |
|
BxDolPFMAr
ea.prototy
pe.openFie
ldDialog =
function(
iItemID,
iAreaID )
{
|
|
|
501 |
|
$( '#f
ieldFormWr
ap' ).css(
{
|
|
|
502 |
|
wi
dth: ( doc
ument.body
.clientWid
th + 30 ),
|
|
|
503 |
|
he
ight: ( (
window.inn
erHeight ?
window.in
nerHeight
: screen.h
eight) + 3
0 ),
|
|
|
504 |
|
le
ft: ( this
.getHorizS
croll() -
30 ),
|
|
|
505 |
|
to
p: ( this.
getVertScr
oll() - 30
),
|
|
|
506 |
|
di
splay: 'bl
ock'
|
|
|
507 |
|
});
|
|
|
508 |
|
|
|
|
509 |
|
$( '#e
dit_form_c
ont' ).htm
l( '<div c
lass="noti
fy_msg">Lo
ading...</
div>' ).lo
ad( this.p
arent.conf
ig.parserU
rl + '?act
ion=loadEd
itForm&id=
' + iItemI
D + '&area
=' + iArea
ID );
|
|
|
510 |
|
}
|
|
|
511 |
|
|
|
|
512 |
|
|
|
|
513 |
|
BxDolPFMAr
ea.prototy
pe.getHori
zScroll =
function()
{
|
|
|
514 |
|
return
(navigato
r.appName
== "Micros
oft Intern
et Explore
r") ? docu
ment.docum
entElement
.scrollLef
t : window
.pageXOffs
et;
|
|
|
515 |
|
}
|
|
|
516 |
|
|
|
|
517 |
|
BxDolPFMAr
ea.prototy
pe.getVert
Scroll = f
unction()
{
|
|
|
518 |
|
return
(navigato
r.appName
== "Micros
oft Intern
et Explore
r") ? docu
ment.docum
entElement
.scrollTop
: window.
pageYOffse
t;
|
|
|
519 |
|
}
|
|
|
520 |
|
|
|
|
521 |
|
|
|
|
522 |
|
/* * * * B
lock Class
* * * */
|
|
|
523 |
|
|
|
|
524 |
|
function B
xDolPFMBlo
ck( parent
, oBlockDa
ta ) {
|
|
|
525 |
|
this.i
d =
oBlockDat
a.id;
|
|
|
526 |
|
this.p
arent =
parent;
|
|
|
527 |
|
this.n
ame =
oBlockDat
a.name;
|
|
|
528 |
|
this.e
lementID =
'build_bl
ock_' + th
is.parent.
id + '_' +
this.id;
|
|
|
529 |
|
}
|
|
|
530 |
|
|
|
|
531 |
|
BxDolPFMBl
ock.protot
ype.draw =
function(
oParentEl
ement ) {
|
|
|
532 |
|
var oT
hisBlock =
this;
|
|
|
533 |
|
|
|
|
534 |
|
$( oPa
rentElemen
t ).append
( this.get
Code() );
|
|
|
535 |
|
$( '#'
+ this.el
ementID +
' > div.bu
ild_block_
header' ).
children(
'a' ).clic
k( functio
n(){
|
|
|
536 |
|
oT
hisBlock.p
arent.open
FieldDialo
g( oThisBl
ock.id, oT
hisBlock.p
arent.id )
;
|
|
|
537 |
|
} );
|
|
|
538 |
|
|
|
|
539 |
|
this.g
etElement(
);
|
|
|
540 |
|
}
|
|
|
541 |
|
|
|
|
542 |
|
BxDolPFMBl
ock.protot
ype.getCod
e = functi
on() {
|
|
|
543 |
|
return
'<div cla
ss="build_
block" id=
"' + this.
elementID
+ '">' +
|
|
|
544 |
|
'<div cl
ass="build
_block_hea
der">' +
|
|
|
545 |
|
'<a
href="java
script:voi
d(0)">' +
|
|
|
546 |
|
this.name
+
|
|
|
547 |
|
'</a
>' +
|
|
|
548 |
|
'</div>'
+
|
|
|
549 |
|
'<div cl
ass="build
_item_fake
"></div>'
+
|
|
|
550 |
|
'<
/div>';
|
|
|
551 |
|
}
|
|
|
552 |
|
|
|
|
553 |
|
BxDolPFMBl
ock.protot
ype.getEle
ment = fun
ction() {
|
|
|
554 |
|
this.e
lement = $
( '#' + th
is.element
ID ).get(0
);
|
|
|
555 |
|
}
|
|
|
556 |
|
|
|
|
557 |
|
BxDolPFMBl
ock.protot
ype.update
Name = fun
ction( sNe
wName ) {
|
|
|
558 |
|
$( thi
s.element
).children
( 'div.bui
ld_block_h
eader' ).c
hildren( '
a' ).html(
sNewName
);
|
|
|
559 |
|
}
|
|
|
560 |
|
|
|
|
561 |
|
/* * * * I
tem Class
* * * */
|
|
|
562 |
|
|
|
|
563 |
|
function B
xDolPFMIte
m( parent,
oItemData
) {
|
|
|
564 |
|
this.i
d =
oItemData
.id;
|
|
|
565 |
|
this.p
arent =
parent;
|
|
|
566 |
|
this.n
ame =
oItemData
.name;
|
|
|
567 |
|
this.b
lock =
oItemData
.block;
|
|
|
568 |
|
|
|
|
569 |
|
this.e
lementID =
'build_it
em_' + thi
s.parent.i
d + '_' +
this.id;
|
|
|
570 |
|
}
|
|
|
571 |
|
|
|
|
572 |
|
BxDolPFMIt
em.prototy
pe.draw =
function(
oParentEle
ment ) {
|
|
|
573 |
|
var oT
hisItem =
this;
|
|
|
574 |
|
|
|
|
575 |
|
$( oPa
rentElemen
t ).append
( this.get
Code() );
|
|
|
576 |
|
$( '#'
+ this.el
ementID ).
children(
'a' ).clic
k( functio
n(){
|
|
|
577 |
|
oT
hisItem.pa
rent.openF
ieldDialog
( oThisIte
m.id, oThi
sItem.pare
nt.id );
|
|
|
578 |
|
} );
|
|
|
579 |
|
|
|
|
580 |
|
this.g
etElement(
);
|
|
|
581 |
|
}
|
|
|
582 |
|
|
|
|
583 |
|
BxDolPFMIt
em.prototy
pe.getCode
= functio
n( oParent
Element )
{
|
|
|
584 |
|
return
'<div cla
ss="build_
item_activ
e" id="' +
this.elem
entID + '"
>' +
|
|
|
585 |
|
'<
a href="ja
vascript:v
oid(0)">'
+
|
|
|
586 |
|
this.nam
e +
|
|
|
587 |
|
'<
/a>' +
|
|
|
588 |
|
'</div
>';
|
|
|
589 |
|
}
|
|
|
590 |
|
BxDolPFMIt
em.prototy
pe.getElem
ent = func
tion() {
|
|
|
591 |
|
this.e
lement = $
( '#' + th
is.element
ID ).get(0
);
|
|
|
592 |
|
}
|
|
|
593 |
|
|
|
|
594 |
|
BxDolPFMIt
em.prototy
pe.updateN
ame = func
tion( sNew
Name ) {
|
|
|
595 |
|
$( thi
s.element
).children
( 'a' ).ht
ml( sNewNa
me );
|
|
|
596 |
|
}
|
|
|
597 |
|
|
|
|
598 |
|
/* * * * N
on-class f
unctions *
* * */
|
|
|
599 |
|
|
|
|
600 |
|
|
|
|
601 |
|
|
|
|
602 |
|
function h
ideEditFor
m() {
|
|
|
603 |
|
//if(
confirm( '
Close prop
erties win
dow?' ) )
|
|
|
604 |
|
$(
'#fieldFo
rmWrap' ).
css({displ
ay:'none'}
);
|
|
|
605 |
|
}
|
|
|
606 |
|
|
|
|
607 |
|
|
|
|
608 |
|
function c
hangeField
Type( _typ
e ) {
|
|
|
609 |
|
var aS
how = new
Array();
|
|
|
610 |
|
var aH
ide = new
Array();
|
|
|
611 |
|
|
|
|
612 |
|
switch
( _type )
{
|
|
|
613 |
|
ca
se 'text':
|
|
|
614 |
|
aShow =
new Array(
'field_mi
nimum', 'f
ield_maxim
um', 'fiel
d_unique',
'field_ch
eck', 'fie
ld_minimum
_msg', 'fi
eld_maximu
m_msg', 'f
ield_uniqu
e_msg', 'f
ield_check
_msg', 'fi
eld_defaul
t' );
|
|
|
615 |
|
aHide =
new Array(
'field_co
ntrol_sele
ct_one', '
field_cont
rol_select
_set', 'fi
eld_values
', 'field_
lkey' );
|
|
|
616 |
|
br
eak;
|
|
|
617 |
|
ca
se 'area':
|
|
|
618 |
|
aShow =
new Array(
'field_mi
nimum', 'f
ield_maxim
um', 'fiel
d_unique',
'field_ch
eck', 'fie
ld_minimum
_msg', 'fi
eld_maximu
m_msg', 'f
ield_uniqu
e_msg', 'f
ield_check
_msg' );
|
|
|
619 |
|
aHide =
new Array(
'field_co
ntrol_sele
ct_one', '
field_cont
rol_select
_set', 'fi
eld_values
', 'field_
default',
'field_lke
y' );
|
|
|
620 |
|
br
eak;
|
|
|
621 |
|
ca
se 'pass':
|
|
|
622 |
|
aShow =
new Array(
'field_mi
nimum', 'f
ield_maxim
um', 'fiel
d_check',
'field_min
imum_msg',
'field_ma
ximum_msg'
, 'field_c
heck_msg'
);
|
|
|
623 |
|
aHide =
new Array(
'field_co
ntrol_sele
ct_one', '
field_cont
rol_select
_set', 'fi
eld_unique
', 'field_
unique_msg
', 'field_
values', '
field_defa
ult', 'fie
ld_lkey' )
;
|
|
|
624 |
|
br
eak;
|
|
|
625 |
|
ca
se 'date':
|
|
|
626 |
|
aShow =
new Array(
'field_mi
nimum', 'f
ield_maxim
um', 'fiel
d_check',
'field_min
imum_msg',
'field_ma
ximum_msg'
, 'field_c
heck_msg',
'field_de
fault' );
|
|
|
627 |
|
aHide =
new Array(
'field_co
ntrol_sele
ct_one', '
field_cont
rol_select
_set', 'fi
eld_unique
', 'field_
unique_msg
', 'field_
values', '
field_lkey
' );
|
|
|
628 |
|
br
eak;
|
|
|
629 |
|
ca
se 'select
_one':
|
|
|
630 |
|
aShow =
new Array(
'field_co
ntrol_sele
ct_one', '
field_valu
es', 'fiel
d_default'
, 'field_l
key' );
|
|
|
631 |
|
aHide =
new Array(
'field_mi
nimum', 'f
ield_maxim
um', 'fiel
d_unique',
'field_ch
eck', 'fie
ld_control
_select_se
t', 'field
_minimum_m
sg', 'fiel
d_maximum_
msg', 'fie
ld_unique_
msg', 'fie
ld_check_m
sg' );
|
|
|
632 |
|
br
eak;
|
|
|
633 |
|
ca
se 'select
_set':
|
|
|
634 |
|
aShow =
new Array(
'field_co
ntrol_sele
ct_set', '
field_valu
es', 'fiel
d_lkey' );
|
|
|
635 |
|
aHide =
new Array(
'field_mi
nimum', 'f
ield_maxim
um', 'fiel
d_control_
select_one
', 'field_
default',
'field_uni
que', 'fie
ld_check',
'field_mi
nimum_msg'
, 'field_m
aximum_msg
', 'field_
unique_msg
', 'field_
check_msg'
);
|
|
|
636 |
|
br
eak;
|
|
|
637 |
|
ca
se 'num':
|
|
|
638 |
|
aShow =
new Array(
'field_mi
nimum', 'f
ield_maxim
um', 'fiel
d_unique',
'field_ch
eck', 'fie
ld_minimum
_msg', 'fi
eld_maximu
m_msg', 'f
ield_uniqu
e_msg', 'f
ield_check
_msg', 'fi
eld_defaul
t' );
|
|
|
639 |
|
aHide =
new Array(
'field_co
ntrol_sele
ct_one', '
field_cont
rol_select
_set', 'fi
eld_values
', 'field_
lkey' );
|
|
|
640 |
|
br
eak;
|
|
|
641 |
|
ca
se 'range'
:
|
|
|
642 |
|
aShow =
new Array(
'field_mi
nimum', 'f
ield_maxim
um', 'fiel
d_check',
'field_min
imum_msg',
'field_ma
ximum_msg'
, 'field_c
heck_msg',
'field_de
fault' );
|
|
|
643 |
|
aHide =
new Array(
'field_co
ntrol_sele
ct_one', '
field_cont
rol_select
_set', 'fi
eld_unique
', 'field_
unique_msg
', 'field_
values', '
field_lkey
' );
|
|
|
644 |
|
br
eak;
|
|
|
645 |
|
ca
se 'bool':
|
|
|
646 |
|
aShow =
new Array(
'field_de
fault');
|
|
|
647 |
|
aHide =
new Array(
'field_co
ntrol_sele
ct_one', '
field_cont
rol_select
_set', 'fi
eld_unique
', 'field_
minimum',
'field_max
imum', 'fi
eld_check'
, 'field_m
inimum_msg
', 'field_
maximum_ms
g', 'field
_unique_ms
g', 'field
_check_msg
', 'field_
values', '
field_lkey
' );
|
|
|
648 |
|
br
eak;
|
|
|
649 |
|
}
|
|
|
650 |
|
|
|
|
651 |
|
for( v
ar iInd =
0; iInd <
aHide.leng
th; iInd +
+ )
|
|
|
652 |
|
$(
'#' + aHi
de[iInd] )
.css( {dis
play: 'non
e'} );
|
|
|
653 |
|
|
|
|
654 |
|
for( v
ar iInd =
0; iInd <
aShow.leng
th; iInd +
+ )
|
|
|
655 |
|
$(
'#' + aSh
ow[iInd] )
.css( {dis
play: ''}
);
|
|
|
656 |
|
|
|
|
657 |
|
}
|
|
|
658 |
|
|
|
|
659 |
|
function a
ctivateVal
uesEdit( e
Link ) {
|
|
|
660 |
|
$( eLi
nk ).paren
t().html(
'<textarea
class="in
put_text"
name="' +
|
|
|
661 |
|
$(
eLink ).s
iblings( '
input' ).a
ttr( 'name
' ) +
|
|
|
662 |
|
'"
>' +
|
|
|
663 |
|
$(
eLink ).s
iblings( '
input' ).v
al() +
|
|
|
664 |
|
'<
/textarea>
'
|
|
|
665 |
|
);
|
|
|
666 |
|
}
|
|
|
667 |
|
|
|
|
668 |
|
function c
learFormEr
rors( eFor
m ) {
|
|
|
669 |
|
$( 'td
.warned',
eForm ).re
moveClass(
'warned'
).next( 't
d' ).child
ren( 'img.
depr_icon'
).remove(
);
|
|
|
670 |
|
}
|
|
|
671 |
|
|
|
|
672 |
|
function g
enEditForm
Error( sFi
eld, sText
) {
|
|
|
673 |
|
if( do
cument.for
ms.fieldEd
itForm[sFi
eld] ) {
|
|
|
674 |
|
$(
document.
forms.fiel
dEditForm[
sField] ).
parent( 't
d' ).addCl
ass( 'warn
ed' ).next
( 'td' ).p
repend(
|
|
|
675 |
|
'<img sr
c="images/
depr.gif"
class="dep
r_icon" '
+
|
|
|
676 |
|
'onmouse
over="show
FloatDesc(
\'' + proc
essFloatDe
scInput( s
Text ) + '
\')" ' +
|
|
|
677 |
|
'onmouse
move="move
FloatDesc(
event )"
' +
|
|
|
678 |
|
'onmouse
out="hideF
loatDesc()
" ' +
|
|
|
679 |
|
' />'
|
|
|
680 |
|
);
|
|
|
681 |
|
}
|
|
|
682 |
|
}
|
|
|
683 |
|
|
|
|
684 |
|
function u
pdateBuild
er( sText,
iItemID,
sNewName )
{
|
|
|
685 |
|
oPFM.u
pdateAreas
( sText, i
ItemID, sN
ewName );
|
|
|
686 |
|
}
|
|
|
687 |
|
|
|
|
688 |
|
function p
rocessFloa
tDescInput
( sText )
{
|
|
|
689 |
|
sText
= sText.re
place( /&/
g, '&'
);
|
|
|
690 |
|
sText
= sText.re
place( /</
g, '<'
);
|
|
|
691 |
|
sText
= sText.re
place( />/
g, '>'
);
|
|
|
692 |
|
sText
= sText.re
place( /"/
g, '"
' );
|
|
|
693 |
|
sText
= sText.re
place( /\\
/g, '\\\\'
);
|
|
|
694 |
|
sText
= sText.re
place( /'/
g, '\\\''
);
|
|
|
695 |
|
|
|
|
696 |
|
return
sText;
|
|
|
697 |
|
}
|
|
|
698 |
|
|