minor changes (smoothen rough edges)

master
Steve L. Nyemba 6 years ago
parent df17531499
commit 34df3788e1

@ -21,16 +21,25 @@ jx.cloudview.oauth.init = function (id, key,callback,err) {
httpclient.setHeader("platform",navigator.appName) httpclient.setHeader("platform",navigator.appName)
try{ try{
httpclient.post(url, function (x) { httpclient.post(url, function (x) {
var url = x.responseText var url = x.responseText
var oauth_uri = url.match(/redirect_uri=(.+)&/)[1];
url = url.replace(oauth_uri, key) if(url.match(/^http.+$/)){
var oauth_uri = url.match(/redirect_uri=(.+)&/)[1];
url = url.replace(oauth_uri, key)
jx.cloudview.handler = null
jx.cloudview.popup = window.open(url, 'oauth', 'width=405, height=900')
jx.cloudview.oauth.listen(key,callback,err)
}else{
jx.dom.set.value('dialog.status','<i class="fa fa-times" style="color:maroon; font-size:12px"></i> http error '+x.status+' ... closing window')
setTimeout(()=>{
err()
},2500);
}
jx.cloudview.handler = null
jx.cloudview.popup = window.open(url, 'oauth', 'width=405, height=900')
jx.cloudview.oauth.listen(key,callback,err)
}) })
}catch(error){ }catch(error){
err() err()

@ -38,14 +38,16 @@ __jx_modalw__.render.modal = function(args){
if(args.url != null){ if(args.url != null){
// //
// a modal window that is a reference to another site // a modal window that is a reference to another site
bg.style.gridTemplateColumns = '10% 80% 10%' bg.style.gridTemplateColumns = '10% 80% 10%'
bg.style.gridTemplateRows = '10% 80% 10%' bg.style.gridTemplateRows = '10% 80% 10%'
var iframe = jx.dom.get.instance('IFRAME') var iframe = jx.dom.get.instance('IFRAME')
args.css = (args.css != null)?args.css:{}
iframe.src = args.url iframe.src = args.url
iframe.frameBorder = 0 iframe.frameBorder = 0
iframe.style.width = '99%' iframe.style.width = '99%' //(args.css.width == null)?'99%':args.css.width
iframe.style.height= '99%' iframe.style.height= '99%' //(args.css.height==null)?'99%':args.css.height
iframe.style.backgroundColor = '#ffffff' iframe.style.backgroundColor = '#ffffff'
iframe.className = 'border-round border' iframe.className = 'border-round border'
frame.appendChild(iframe) frame.appendChild(iframe)
@ -98,14 +100,18 @@ __jx_modalw__.render.show = function(info){
info.background.className = 'jxmodal' info.background.className = 'jxmodal'
// info.background.style.position = 'absolute' // info.background.style.position = 'absolute'
var parent = (info.target != null)?jx.dom.get.instance(info.id): document.body var parent = (info.target != null)?jx.dom.get.instance(info.target): document.body
var height = $(parent).height() var height = $(parent).height()
var width = $(parent).width() var width = $(parent).width()
parent.appendChild(info.background) parent.appendChild(info.background)
// if(info.html == null){ // if(info.html == null){
info.background.style.top = 0 info.background.style.top = 0
info.background.style.left =0 info.background.style.left =0
info.background.style.position = 'absolute' info.background.style.position = 'absolute'
// }else{ // }else{
// $(info.background).width(width+(width*0.01)) // $(info.background).width(width+(width*0.01))
// $(info.background).height(height+(height*0.1)) // $(info.background).height(height+(height*0.1))

@ -86,7 +86,8 @@ jx.slides.instance = function(args){
var pane = jx.dom.get.instance('DIV') var pane = jx.dom.get.instance('DIV')
var width = $('#'+this.main_id).width() var width = $('#'+this.main_id).width()
var height = $('#'+this.main_id).height() var height = $('#'+this.main_id).height()
var N = data.length var N = this.data.length
this.page = {index:0,count:N} this.page = {index:0,count:N}
// jx.dom.set.attribute(this.nav_id,"info",info) // jx.dom.set.attribute(this.nav_id,"info",info)
@ -99,7 +100,9 @@ jx.slides.instance = function(args){
jx.dom.set.value(this.main_id,'') jx.dom.set.value(this.main_id,'')
jx.dom.append(this.main_id,pane) jx.dom.append(this.main_id,pane)
jx.utils.patterns.visitor(this.data,function(item){ jx.utils.patterns.visitor(this.data,function(item){
console.log(item.constructor.prototype.name)
var frame = jx.dom.get.instance('DIV') var frame = jx.dom.get.instance('DIV')
var picframe = jx.dom.get.instance('DIV') var picframe = jx.dom.get.instance('DIV')
var image = jx.dom.get.instance('IMG') var image = jx.dom.get.instance('IMG')

Loading…
Cancel
Save