Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@italentjs/italent-header

Package Overview
Dependencies
Maintainers
3
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@italentjs/italent-header - npm Package Compare versions

Comparing version 1.0.49 to 1.0.50

89

app/scripts/vendor/components/iTalent-header/index.js

@@ -11,3 +11,3 @@ /*

this["JST"]["header/company-info"] = function(obj) {obj || (obj = {});var __t, __p = '', __e = _.escape;with (obj) {__p += '<div class="company-icon">\n\t<!-- <a href="' +((__t = ( href)) == null ? '' : __t) +'"><img class="cmpy-logo" src="' +((__t = (logo)) == null ? '' : __t) +'"></a> -->\n\t<a href="' +((__t = ( href)) == null ? '' : __t) +'"><img class="cmpy-logo" alt="logo"></a>\n\t<span class="company-name">' +((__t = ( name)) == null ? '' : __t) +'</span>\n</div>';}return __p};
this["JST"]["header/company-info"] = function(obj) {obj || (obj = {});var __t, __p = '', __e = _.escape;with (obj) {__p += '<div class="company-icon">\n\t<!-- <a href="' +((__t = ( href)) == null ? '' : __t) +'"><img class="cmpy-logo" src="' +((__t = (logo)) == null ? '' : __t) +'"></a> -->\n\t<a href="' +((__t = ( href)) == null ? '' : __t) +'"><img class="cmpy-logo" src="' +((__t = (logo)) == null ? '' : __t) +'" alt="logo"></a>\n\t<span class="company-name">' +((__t = ( name)) == null ? '' : __t) +'</span>\n</div>';}return __p};

@@ -556,53 +556,54 @@ this["JST"]["header/header"] = function(obj) {obj || (obj = {});var __t, __p = '', __e = _.escape;with (obj) {__p += ' \n <div class="header-out-wrapper">\n <div class="header-left company-info-region clearfix"></div>\n <div class="header-right clearfix">\n <div class="lang-region"></div>\n <!--用户信息-->\n <div class="header-webim-region"></div>\n <div class="user-info-region"></div>\n <ul class=\'btns-group\'></ul>\n \n </div>\n </div>\n';}return __p};

// });
var self = this;
var imgUrl = this.model.get("logo");
if(!imgUrl)return;
var img = new Image();
img.onload= function(){
var imgWidth = img.width;
var imgHeight = img.height;
//分界线
// var self = this;
// var imgUrl = this.model.get("logo");
// if(!imgUrl)return;
// var img = new Image();
// img.onload= function(){
// var imgWidth = img.width;
// var imgHeight = img.height;
var size = fixSize(imgWidth,imgHeight)
// var size = fixSize(imgWidth,imgHeight)
self.ui.companyLogo.css({
width:parseInt(size.w) || 1,
height:parseInt(size.h) || 1,
display:"block",
marginTop:(30-size.h) / 2
})
// self.ui.companyLogo.css({
// width:parseInt(size.w) || 1,
// height:parseInt(size.h) || 1,
// display:"block",
// marginTop:(30-size.h) / 2
// })
self.ui.companyLogo.attr("src", imgUrl);
function fixSize(imgWidth,imgHeight){
var iWidth = 150,
iHeight = 30;
var newSize = {}
// self.ui.companyLogo.attr("src", imgUrl);
// function fixSize(imgWidth,imgHeight){
// var iWidth = 150,
// iHeight = 30;
// var newSize = {}
var fix = imgWidth/imgHeight;
// var fix = imgWidth/imgHeight;
if(imgWidth > 150 || imgHeight > 30 ){
// if(imgWidth > 150 || imgHeight > 30 ){
width = fix *30
height = 150/fix;
if(width > 150){
width = 150
}
if(height > 30){
height = 30
}
// width = fix *30
// height = 150/fix;
// if(width > 150){
// width = 150
// }
// if(height > 30){
// height = 30
// }
newSize = {
w : width,
h : height
}
// newSize = {
// w : width,
// h : height
// }
}else{
newSize = {
w : imgWidth,
h : imgHeight
}
}
return newSize
}
};
img.src = imgUrl;
// }else{
// newSize = {
// w : imgWidth,
// h : imgHeight
// }
// }
// return newSize
// }
// };
// img.src = imgUrl;
}

@@ -609,0 +610,0 @@ });

@@ -11,3 +11,3 @@ /*

this["JST"]["header/company-info"] = function(obj) {obj || (obj = {});var __t, __p = '', __e = _.escape;with (obj) {__p += '<div class="company-icon">\n\t<!-- <a href="' +((__t = ( href)) == null ? '' : __t) +'"><img class="cmpy-logo" src="' +((__t = (logo)) == null ? '' : __t) +'"></a> -->\n\t<a href="' +((__t = ( href)) == null ? '' : __t) +'"><img class="cmpy-logo" alt="logo"></a>\n\t<span class="company-name">' +((__t = ( name)) == null ? '' : __t) +'</span>\n</div>';}return __p};
this["JST"]["header/company-info"] = function(obj) {obj || (obj = {});var __t, __p = '', __e = _.escape;with (obj) {__p += '<div class="company-icon">\n\t<!-- <a href="' +((__t = ( href)) == null ? '' : __t) +'"><img class="cmpy-logo" src="' +((__t = (logo)) == null ? '' : __t) +'"></a> -->\n\t<a href="' +((__t = ( href)) == null ? '' : __t) +'"><img class="cmpy-logo" src="' +((__t = (logo)) == null ? '' : __t) +'" alt="logo"></a>\n\t<span class="company-name">' +((__t = ( name)) == null ? '' : __t) +'</span>\n</div>';}return __p};

@@ -556,53 +556,54 @@ this["JST"]["header/header"] = function(obj) {obj || (obj = {});var __t, __p = '', __e = _.escape;with (obj) {__p += ' \n <div class="header-out-wrapper">\n <div class="header-left company-info-region clearfix"></div>\n <div class="header-right clearfix">\n <div class="lang-region"></div>\n <!--用户信息-->\n <div class="header-webim-region"></div>\n <div class="user-info-region"></div>\n <ul class=\'btns-group\'></ul>\n \n </div>\n </div>\n';}return __p};

// });
var self = this;
var imgUrl = this.model.get("logo");
if(!imgUrl)return;
var img = new Image();
img.onload= function(){
var imgWidth = img.width;
var imgHeight = img.height;
//分界线
// var self = this;
// var imgUrl = this.model.get("logo");
// if(!imgUrl)return;
// var img = new Image();
// img.onload= function(){
// var imgWidth = img.width;
// var imgHeight = img.height;
var size = fixSize(imgWidth,imgHeight)
// var size = fixSize(imgWidth,imgHeight)
self.ui.companyLogo.css({
width:parseInt(size.w) || 1,
height:parseInt(size.h) || 1,
display:"block",
marginTop:(30-size.h) / 2
})
// self.ui.companyLogo.css({
// width:parseInt(size.w) || 1,
// height:parseInt(size.h) || 1,
// display:"block",
// marginTop:(30-size.h) / 2
// })
self.ui.companyLogo.attr("src", imgUrl);
function fixSize(imgWidth,imgHeight){
var iWidth = 150,
iHeight = 30;
var newSize = {}
// self.ui.companyLogo.attr("src", imgUrl);
// function fixSize(imgWidth,imgHeight){
// var iWidth = 150,
// iHeight = 30;
// var newSize = {}
var fix = imgWidth/imgHeight;
// var fix = imgWidth/imgHeight;
if(imgWidth > 150 || imgHeight > 30 ){
// if(imgWidth > 150 || imgHeight > 30 ){
width = fix *30
height = 150/fix;
if(width > 150){
width = 150
}
if(height > 30){
height = 30
}
// width = fix *30
// height = 150/fix;
// if(width > 150){
// width = 150
// }
// if(height > 30){
// height = 30
// }
newSize = {
w : width,
h : height
}
// newSize = {
// w : width,
// h : height
// }
}else{
newSize = {
w : imgWidth,
h : imgHeight
}
}
return newSize
}
};
img.src = imgUrl;
// }else{
// newSize = {
// w : imgWidth,
// h : imgHeight
// }
// }
// return newSize
// }
// };
// img.src = imgUrl;
}

@@ -609,0 +610,0 @@ });

@@ -8,3 +8,3 @@ {

"configUser": "ux",
"version": "1.0.49",
"version": "1.0.50",
"scripts": {

@@ -11,0 +11,0 @@ "build-prod": "rm -rf index.css && rm -rf index.js && grunt build",

@@ -30,54 +30,55 @@

// });
var self = this;
var imgUrl = this.model.get("logo");
if(!imgUrl)return;
var img = new Image();
img.onload= function(){
var imgWidth = img.width;
var imgHeight = img.height;
//分界线
// var self = this;
// var imgUrl = this.model.get("logo");
// if(!imgUrl)return;
// var img = new Image();
// img.onload= function(){
// var imgWidth = img.width;
// var imgHeight = img.height;
var size = fixSize(imgWidth,imgHeight)
// var size = fixSize(imgWidth,imgHeight)
self.ui.companyLogo.css({
width:parseInt(size.w) || 1,
height:parseInt(size.h) || 1,
display:"block",
marginTop:(30-size.h) / 2
})
// self.ui.companyLogo.css({
// width:parseInt(size.w) || 1,
// height:parseInt(size.h) || 1,
// display:"block",
// marginTop:(30-size.h) / 2
// })
self.ui.companyLogo.attr("src", imgUrl);
function fixSize(imgWidth,imgHeight){
var iWidth = 150,
iHeight = 30;
var newSize = {}
// self.ui.companyLogo.attr("src", imgUrl);
// function fixSize(imgWidth,imgHeight){
// var iWidth = 150,
// iHeight = 30;
// var newSize = {}
var fix = imgWidth/imgHeight;
// var fix = imgWidth/imgHeight;
if(imgWidth > 150 || imgHeight > 30 ){
// if(imgWidth > 150 || imgHeight > 30 ){
width = fix *30
height = 150/fix;
if(width > 150){
width = 150
}
if(height > 30){
height = 30
}
// width = fix *30
// height = 150/fix;
// if(width > 150){
// width = 150
// }
// if(height > 30){
// height = 30
// }
newSize = {
w : width,
h : height
}
// newSize = {
// w : width,
// h : height
// }
}else{
newSize = {
w : imgWidth,
h : imgHeight
}
}
return newSize
}
};
img.src = imgUrl;
// }else{
// newSize = {
// w : imgWidth,
// h : imgHeight
// }
// }
// return newSize
// }
// };
// img.src = imgUrl;
}
});
this["JST"] = this["JST"] || {};
this["JST"]["header/company-info"] = function(obj) {obj || (obj = {});var __t, __p = '', __e = _.escape;with (obj) {__p += '<div class="company-icon">\n\t<!-- <a href="' +((__t = ( href)) == null ? '' : __t) +'"><img class="cmpy-logo" src="' +((__t = (logo)) == null ? '' : __t) +'"></a> -->\n\t<a href="' +((__t = ( href)) == null ? '' : __t) +'"><img class="cmpy-logo" alt="logo"></a>\n\t<span class="company-name">' +((__t = ( name)) == null ? '' : __t) +'</span>\n</div>';}return __p};
this["JST"]["header/company-info"] = function(obj) {obj || (obj = {});var __t, __p = '', __e = _.escape;with (obj) {__p += '<div class="company-icon">\n\t<!-- <a href="' +((__t = ( href)) == null ? '' : __t) +'"><img class="cmpy-logo" src="' +((__t = (logo)) == null ? '' : __t) +'"></a> -->\n\t<a href="' +((__t = ( href)) == null ? '' : __t) +'"><img class="cmpy-logo" src="' +((__t = (logo)) == null ? '' : __t) +'" alt="logo"></a>\n\t<span class="company-name">' +((__t = ( name)) == null ? '' : __t) +'</span>\n</div>';}return __p};

@@ -5,0 +5,0 @@ this["JST"]["header/header"] = function(obj) {obj || (obj = {});var __t, __p = '', __e = _.escape;with (obj) {__p += ' \n <div class="header-out-wrapper">\n <div class="header-left company-info-region clearfix"></div>\n <div class="header-right clearfix">\n <div class="lang-region"></div>\n <!--用户信息-->\n <div class="header-webim-region"></div>\n <div class="user-info-region"></div>\n <ul class=\'btns-group\'></ul>\n \n </div>\n </div>\n';}return __p};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc