@ -11085,112 +11085,14 @@ if (!_global.BI) {
} ,
/ * *
* 对字符串进行加密 { @ link # decrypt }
* @ static
* @ param str 原始字符 <EFBFBD> ?
* @ param keyt 密钥
* @ returns { String } 加密后的字符 <EFBFBD> ?
* /
encrypt : function ( str , keyt ) {
if ( str == "" ) {
return "" ;
}
str = escape ( str ) ;
if ( ! keyt || keyt == "" ) {
keyt = "655" ;
}
keyt = escape ( keyt ) ;
if ( keyt == null || keyt . length <= 0 ) {
alert ( "Please enter a password with which to encrypt the message." ) ;
return null ;
}
var prand = "" ;
for ( var i = 0 ; i < keyt . length ; i ++ ) {
prand += keyt . charCodeAt ( i ) . toString ( ) ;
}
var sPos = Math . floor ( prand . length / 5 ) ;
var mult = parseInt ( prand . charAt ( sPos ) + prand . charAt ( sPos * 2 ) + prand . charAt ( sPos * 3 ) + prand . charAt ( sPos * 4 ) + prand . charAt ( sPos * 5 ) ) ;
var incr = Math . ceil ( keyt . length / 2 ) ;
var modu = Math . pow ( 2 , 31 ) - 1 ;
if ( mult < 2 ) {
alert ( "Algorithm cannot find a suitable hash. Please choose a different password. \nPossible considerations are to choose a more complex or longer password." ) ;
return null ;
}
// var salt = Math.round(Math.random() * 1000000000) % 100000000;
var salt = 101 ;
prand += salt ;
while ( prand . length > 10 ) {
prand = ( parseInt ( prand . substring ( 0 , 10 ) ) + parseInt ( prand . substring ( 10 , prand . length ) , 10 ) ) . toString ( ) ;
}
prand = ( mult * prand + incr ) % modu ;
var enc _chr = "" ;
var enc _str = "" ;
for ( var i = 0 ; i < str . length ; i ++ ) {
enc _chr = parseInt ( str . charCodeAt ( i ) ^ Math . floor ( ( prand / modu ) * 255 ) ) ;
if ( enc _chr < 16 ) {
enc _str += "0" + enc _chr . toString ( 16 ) ;
} else {
enc _str += enc _chr . toString ( 16 ) ;
}
prand = ( mult * prand + incr ) % modu ;
}
salt = salt . toString ( 16 ) ;
while ( salt . length < 8 ) {
salt = "0" + salt ;
}
enc _str += salt ;
return enc _str ;
} ,
/ * *
* 对加密后的字符串解密 { @ link # encrypt }
* @ static
* @ param str 加密过的字符 <EFBFBD> ?
* @ param keyt 密钥
* @ returns { String } 解密后的字符 <EFBFBD> ?
* 通用加密方法
* /
decrypt : function ( str , keyt ) {
if ( str == "" ) {
return "" ;
}
if ( ! keyt || keyt == "" ) {
keyt = "655" ;
}
keyt = escape ( keyt ) ;
if ( str == null || str . length < 8 ) {
return ;
}
if ( keyt == null || keyt . length <= 0 ) {
return ;
encrypt : function ( type , text , key ) {
switch ( type ) {
case BI . CRYPT _TYPE . AES :
default :
return BI . aesEncrypt ( text , key ) ;
}
var prand = "" ;
for ( var i = 0 ; i < keyt . length ; i ++ ) {
prand += keyt . charCodeAt ( i ) . toString ( ) ;
}
var sPos = Math . floor ( prand . length / 5 ) ;
var tempmult = prand . charAt ( sPos ) + prand . charAt ( sPos * 2 ) + prand . charAt ( sPos * 3 ) + prand . charAt ( sPos * 4 ) ;
if ( sPos * 5 < prand . length ) {
tempmult += prand . charAt ( sPos * 5 ) ;
}
var mult = parseInt ( tempmult ) ;
var incr = Math . round ( keyt . length / 2 ) ;
var modu = Math . pow ( 2 , 31 ) - 1 ;
var salt = parseInt ( str . substring ( str . length - 8 , str . length ) , 16 ) ;
str = str . substring ( 0 , str . length - 8 ) ;
prand += salt ;
while ( prand . length > 10 ) {
prand = ( parseInt ( prand . substring ( 0 , 10 ) , 10 ) + parseInt ( prand . substring ( 10 , prand . length ) , 10 ) ) . toString ( ) ;
}
prand = ( mult * prand + incr ) % modu ;
var enc _chr = "" ;
var enc _str = "" ;
for ( var i = 0 ; i < str . length ; i += 2 ) {
enc _chr = parseInt ( parseInt ( str . substring ( i , i + 2 ) , 16 ) ^ Math . floor ( ( prand / modu ) * 255 ) ) ;
enc _str += String . fromCharCode ( enc _chr ) ;
prand = ( mult * prand + incr ) % modu ;
}
return unescape ( enc _str ) ;
} ,
/ * *
@ -12335,6 +12237,9 @@ if (!_global.BI) {
/ * *
* CryptoJS core components .
* /
BI . CRYPT _TYPE = BI . CRYPT _TYPE || { } ;
BI . CRYPT _TYPE . AES = "aes" ;
var CryptoJS = CryptoJS || ( function ( Math , undefined ) {
/ * *
* CryptoJS namespace .
@ -41238,7 +41143,7 @@ BI.Combo = BI.inherit(BI.Widget, {
baseCls : ( conf . baseCls || "" ) + " bi-combo" ,
trigger : "click" ,
toggle : true ,
direction : "bottom" , // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right||right,innerRight||right,innerLeft
direction : "bottom" , // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right||right,innerRight||right,innerLeft||innerRight||innerLeft
logic : {
dynamic : true
} ,
@ -41618,6 +41523,12 @@ BI.Combo = BI.inherit(BI.Widget, {
case "right,innerLeft" :
p = BI . DOM . getComboPosition ( combo , this . popupView , o . adjustXOffset || o . adjustLength , o . adjustYOffset , o . isNeedAdjustHeight , [ "right" , "left" , "innerLeft" , "innerRight" , "bottom" , "top" ] , o . offsetStyle ) ;
break ;
case "innerRight" :
p = BI . DOM . getComboPosition ( combo , this . popupView , o . adjustXOffset || o . adjustLength , o . adjustYOffset , o . isNeedAdjustHeight , [ "innerRight" , "innerLeft" , "right" , "left" , "bottom" , "top" ] , o . offsetStyle ) ;
break ;
case "innerLeft" :
p = BI . DOM . getComboPosition ( combo , this . popupView , o . adjustXOffset || o . adjustLength , o . adjustYOffset , o . isNeedAdjustHeight , [ "innerLeft" , "innerRight" , "left" , "right" , "bottom" , "top" ] , o . offsetStyle ) ;
break ;
case "top,custom" :
case "custom,top" :
p = BI . DOM . getTopAdaptPosition ( combo , this . popupView , o . adjustYOffset || o . adjustLength , o . isNeedAdjustHeight ) ;
@ -47207,8 +47118,8 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
value : ""
} ) ;
} ,
_init : function ( ) {
BI . TextAreaEditor . superclass . _init . apply ( this , arguments ) ;
render : function ( ) {
var o = this . options , self = this ;
this . content = BI . createWidget ( {
type : "bi.layout" ,
@ -47258,10 +47169,10 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
BI . Widget . _renderEngine . createElement ( document ) . unbind ( "mousedown." + self . getName ( ) ) ;
} ) ;
if ( BI . isKey ( o . value ) ) {
self . setValue ( o . value ) ;
this . setValue ( o . value ) ;
}
if ( BI . isNotNull ( o . style ) ) {
self . setStyle ( o . style ) ;
this . setStyle ( o . style ) ;
}
this . _checkWaterMark ( ) ;
} ,
@ -47351,6 +47262,11 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
BI . TextAreaEditor . superclass . _setValid . apply ( this , arguments ) ;
// this.content.setValid(b);
// this.watermark && this.watermark.setValid(b);
} ,
_setEnable : function ( b ) {
BI . TextAreaEditor . superclass . _setEnable . apply ( this , [ b ] ) ;
this . content && ( this . content . element [ 0 ] . disabled = ! b ) ;
}
} ) ;
BI . TextAreaEditor . EVENT _CHANGE = "EVENT_CHANGE" ;
@ -52378,13 +52294,16 @@ BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
doClick : function ( ) {
BI . SingleSelectItem . superclass . doClick . apply ( this , arguments ) ;
if ( this . isValid ( ) ) {
this . fireEvent ( BI . MultiSelectItem . EVENT _CHANGE , this . getValue ( ) , this ) ;
}
} ,
setSelected : function ( v ) {
BI . SingleSelectItem . superclass . setSelected . apply ( this , arguments ) ;
}
} ) ;
BI . SingleSelectItem . EVENT _CHANGE = "SingleSelectItem.EVENT_CHANGE" ;
BI . shortcut ( "bi.single_select_item" , BI . SingleSelectItem ) ; / * *
* guy
* 单选框item
@ -60041,6 +59960,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
_defaultConfig : function ( ) {
return BI . extend ( BI . AllCountPager . superclass . _defaultConfig . apply ( this , arguments ) , {
extraCls : "bi-all-count-pager" ,
pagerDirection : "vertical" , // 翻页按钮方向,可选值:vertical/horizontal
height : 24 ,
pages : 1 , // 必选项
curr : 1 , // 初始化当前页, pages为数字时可用,
@ -60049,7 +59969,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
} ,
_init : function ( ) {
BI . AllCountPager . superclass . _init . apply ( this , arguments ) ;
var self = this , o = this . options ;
var self = this , o = this . options , pagerIconCls = this . _getPagerIconCls ( ) ;
this . editor = BI . createWidget ( {
type : "bi.small_text_editor" ,
cls : "pager-editor" ,
@ -60086,7 +60006,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
warningTitle : BI . i18nText ( "BI-Current_Is_First_Page" ) ,
height : 22 ,
width : 22 ,
cls : "bi-border all-pager-prev pull-up-font"
cls : "bi-border all-pager-prev" + pagerIconCls . preCls
} ,
next : {
type : "bi.icon_button" ,
@ -60095,7 +60015,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
warningTitle : BI . i18nText ( "BI-Current_Is_Last_Page" ) ,
height : 22 ,
width : 22 ,
cls : "bi-border all-pager-next pull-down-font"
cls : "bi-border all-pager-next" + pagerIconCls . nextCls
} ,
hasPrev : o . hasPrev ,
@ -60160,6 +60080,23 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
alwaysShowPager : true ,
_getPagerIconCls : function ( ) {
var o = this . options ;
switch ( o . pagerDirection ) {
case "horizontal" :
return {
preCls : " row-pre-page-h-font " ,
nextCls : " row-next-page-h-font "
} ;
case "vertical" :
default :
return {
preCls : " column-pre-page-h-font " ,
nextCls : " column-next-page-h-font "
} ;
}
} ,
setAllPages : function ( v ) {
this . allPages . setText ( "/" + v ) ;
this . allPages . setTitle ( v ) ;
@ -60215,7 +60152,7 @@ BI.DirectionPager = BI.inherit(BI.Widget, {
_defaultConfig : function ( ) {
return BI . extend ( BI . DirectionPager . superclass . _defaultConfig . apply ( this , arguments ) , {
baseCls : "bi-direction-pager" ,
height : 20 ,
height : 24 ,
horizontal : {
pages : false , // 总页数
curr : 1 , // 初始化当前页, pages为数字时可用
@ -60249,19 +60186,19 @@ BI.DirectionPager = BI.inherit(BI.Widget, {
items : [ {
el : this . vpager ,
top : 0 ,
right : 74
right : 86
} , {
el : this . vlabel ,
top : 0 ,
right : 111
right : 110
} , {
el : this . hpager ,
top : 0 ,
right : - 9
right : 0
} , {
el : this . hlabel ,
top : 0 ,
right : 28
right : 24
} ]
} ) ;
} ,
@ -60272,19 +60209,18 @@ BI.DirectionPager = BI.inherit(BI.Widget, {
this . vlabel = BI . createWidget ( {
type : "bi.label" ,
width : 24 ,
height : 20 ,
height : 24 ,
value : v . curr ,
title : v . curr ,
invisible : true
} ) ;
this . vpager = BI . createWidget ( {
type : "bi.pager" ,
width : 76 ,
width : 72 ,
layouts : [ {
type : "bi.horizontal" ,
scrollx : false ,
rgap : 24 ,
vgap : 1
rgap : 24
} ] ,
invisible : true ,
@ -60300,20 +60236,18 @@ BI.DirectionPager = BI.inherit(BI.Widget, {
value : "prev" ,
title : BI . i18nText ( "BI-Up_Page" ) ,
warningTitle : BI . i18nText ( "BI-Current_Is_First_Page" ) ,
height : 20 ,
iconWidth : 16 ,
iconHeight : 16 ,
cls : "direction-pager-prev column-pre-page-h-font"
height : 22 ,
width : 22 ,
cls : "bi-border direction-pager-prev column-pre-page-h-font"
} ,
next : {
type : "bi.icon_button" ,
value : "next" ,
title : BI . i18nText ( "BI-Down_Page" ) ,
warningTitle : BI . i18nText ( "BI-Current_Is_Last_Page" ) ,
height : 20 ,
iconWidth : 16 ,
iconHeight : 16 ,
cls : "direction-pager-next column-next-page-h-font"
height : 22 ,
width : 22 ,
cls : "bi-border direction-pager-next column-next-page-h-font"
} ,
hasPrev : v . hasPrev ,
@ -60337,19 +60271,18 @@ BI.DirectionPager = BI.inherit(BI.Widget, {
this . hlabel = BI . createWidget ( {
type : "bi.label" ,
width : 24 ,
height : 20 ,
height : 24 ,
value : h . curr ,
title : h . curr ,
invisible : true
} ) ;
this . hpager = BI . createWidget ( {
type : "bi.pager" ,
width : 76 ,
width : 72 ,
layouts : [ {
type : "bi.horizontal" ,
scrollx : false ,
rgap : 24 ,
vgap : 1
rgap : 24
} ] ,
invisible : true ,
@ -60365,20 +60298,18 @@ BI.DirectionPager = BI.inherit(BI.Widget, {
value : "prev" ,
title : BI . i18nText ( "BI-Left_Page" ) ,
warningTitle : BI . i18nText ( "BI-Current_Is_First_Page" ) ,
height : 20 ,
iconWidth : 16 ,
iconHeight : 16 ,
cls : "direction-pager-prev row-pre-page-h-font"
height : 22 ,
width : 22 ,
cls : "bi-border direction-pager-prev row-pre-page-h-font"
} ,
next : {
type : "bi.icon_button" ,
value : "next" ,
title : BI . i18nText ( "BI-Right_Page" ) ,
warningTitle : BI . i18nText ( "BI-Current_Is_Last_Page" ) ,
height : 20 ,
iconWidth : 16 ,
iconHeight : 16 ,
cls : "direction-pager-next row-next-page-h-font"
height : 22 ,
width : 22 ,
cls : "bi-border direction-pager-next row-next-page-h-font"
} ,
hasPrev : h . hasPrev ,
@ -60459,7 +60390,7 @@ BI.DirectionPager = BI.inherit(BI.Widget, {
vShow = true ;
}
this . setVisible ( hShow || vShow ) ;
var num = [ 74 , 111 , - 9 , 28 ] ;
var num = [ 86 , 110 , 0 , 24 ] ;
var items = this . layout . attr ( "items" ) ;
if ( vShow === true && hShow === true ) {
@ -69669,8 +69600,11 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
} ,
_init : function ( ) {
var o = this . options ;
BI . MultiLayerSingleLevelTree . superclass . _init . apply ( this , arguments ) ;
this . storeValue = o . value ;
this . initTree ( this . options . items ) ;
this . check ( ) ;
@ -69757,7 +69691,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
el : {
type : "bi.loader" ,
isDefaultInit : false ,
isDefaultInit : o . itemsCreator !== BI . emptyFn ,
chooseType : o . chooseType ,
el : {
type : "bi.button_tree" ,
@ -80582,6 +80516,7 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
} , o . logic , {
items : o . allowNoSelect ? BI . LogicFactory . createLogicItemsByDirection ( o . direction , {
type : "bi.single_select_item" ,
cls : "bi-list-item-active" ,
height : 24 ,
forceNotSelected : true ,
text : BI . i18nText ( "BI-Basic_No_Select" ) ,