|
|
|
@ -55,8 +55,38 @@ Ext.define('Rambox.ux.WebView',{
|
|
|
|
|
badgetextchange: me.onBadgeTextChange |
|
|
|
|
} |
|
|
|
|
,clickEvent: 'dblclick' |
|
|
|
|
,menu: [ |
|
|
|
|
,menu: { |
|
|
|
|
plain: true |
|
|
|
|
,items: [ |
|
|
|
|
{ |
|
|
|
|
xtype: 'toolbar' |
|
|
|
|
,items: [ |
|
|
|
|
{ |
|
|
|
|
xtype: 'segmentedbutton' |
|
|
|
|
,allowToggle: false |
|
|
|
|
,flex: 1 |
|
|
|
|
,items: [ |
|
|
|
|
{ |
|
|
|
|
text: 'Back' |
|
|
|
|
,glyph: 'xf053@FontAwesome' |
|
|
|
|
,flex: 1 |
|
|
|
|
,scope: me |
|
|
|
|
,handler: me.goBack |
|
|
|
|
} |
|
|
|
|
,{ |
|
|
|
|
text: 'Foward' |
|
|
|
|
,glyph: 'xf054@FontAwesome' |
|
|
|
|
,iconAlign: 'right' |
|
|
|
|
,flex: 1 |
|
|
|
|
,scope: me |
|
|
|
|
,handler: me.goForward |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
,'-' |
|
|
|
|
,{ |
|
|
|
|
text: 'Reload' |
|
|
|
|
,glyph: 'xf021@FontAwesome' |
|
|
|
|
,scope: me |
|
|
|
@ -78,6 +108,7 @@ Ext.define('Rambox.ux.WebView',{
|
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
,listeners: { |
|
|
|
|
afterrender: me.onAfterRender |
|
|
|
|
} |
|
|
|
@ -260,4 +291,18 @@ Ext.define('Rambox.ux.WebView',{
|
|
|
|
|
btn.setText(Ext.String.toggle(btn.text, 'Go Online', 'Go Offline')); |
|
|
|
|
btn.offline ? localStorage.setItem('offline_'+me.id.replace('tab_', ''), true) : localStorage.removeItem('offline_'+me.id.replace('tab_', '')); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
,goBack: function() { |
|
|
|
|
var me = this; |
|
|
|
|
var webview = me.down('component').el.dom; |
|
|
|
|
|
|
|
|
|
webview.goBack(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
,goForward: function() { |
|
|
|
|
var me = this; |
|
|
|
|
var webview = me.down('component').el.dom; |
|
|
|
|
|
|
|
|
|
webview.goForward(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|