提交 2b9df06e 编写于 作者: NoSubject's avatar NoSubject

Merge branch 'feature-appmarketv2' into 'develop'

增加应用市场v2

See merge request o2oa/o2oa!1488
......@@ -4,6 +4,8 @@ var apps = [
{ "folder": "x_component_ANN", "tasks": ["move", "min"] },
{ "folder": "x_component_AppCenter", "tasks": ["move", "min"] },
{ "folder": "x_component_AppMarket", "tasks": ["move", "min"] },
{ "folder": "x_component_AppMarketV2", "tasks": ["move", "min"] },
{ "folder": "x_component_AppMarketV2_Application", "tasks": ["move", "min"] },
{ "folder": "x_component_Attendance", "tasks": ["move", "min"] },
{ "folder": "x_component_BAM", "tasks": ["move", "min"] },
{ "folder": "x_component_Calendar", "tasks": ["move", "min"] },
......
<div class="o2_appmarket_appcategorys">
<div data-o2-element="appCategory">
</div>
<div class="o2_appmarket_app_search_box" data-o2-element="searchAppNode">
<div class="o2_appmarket_app_search_box_icon o2_appmarket_app_icon_search" data-o2-element="searchAppIconNode" data-o2-events="click:doAppSearch"></div>
<div class="o2_appmarket_app_area_search_clear" data-o2-element="searchAppClearNode" data-o2-events="click:clearAppSearch"></div>
<div class="o2_appmarket_app_search_inputArea">
<input class="o2_appmarket_app_searchinput" data-o2-element="searchAppInputNode" data-o2-events="focus:focusAppSearch;blur:blurAppSearch;keydown:searchAppInputKeyDown" type="text" placeholder="请输入搜索关键字">
</div>
</div>
</div>
<div style="clear:both;"></div>
<div class="o2_appmarket_appcategory_count" data-o2-element="appCategory_count">
</div>
<div style="clear:both;"></div>
<div class="o2_appmarket_applist" data-o2-element="appList">
</div>
\ No newline at end of file
{
"titleBar": {
"overflow": "hidden",
"height": "50px",
"background-color": "#4c6b87"
},
"titleActionNode": {
"float": "right",
"margin-right": "20px",
"height": "26px",
"border": "1px solid #ffffff",
"border-radius": "5px",
"line-height": "26px",
"text-align": "center",
"padding": "0 20px",
"margin-top": "12px",
"cursor": "pointer",
"color": "#ffffff"
},
"titleTextNode": {
"padding-left": "20px",
"color": "#FFF",
"font-size": "18px",
"line-height": "50px",
"font-weight": "bold",
"width": "160px",
"float": "left"
},
"contentNode": {
"overflow": "auto",
"background-color": "#eeeeee"
},
"contentModuleArea": {
"width": "90%",
"margin": "20px auto",
"overflow": "hidden"
},
"moduleNode": {
"width": "160px",
"height": "300px",
"float": "left",
"background-color": "#f5f5f5",
"margin": "20px 5px"
},
"moduleIconNode": {
"width": "160px",
"height": "160px",
"background-image": "url(../x_component_AppMarket/$Main/default/icon/logo1.png)",
"background-repeat": "no-repeat",
"background-position": "center"
},
"moduleIconAreaNode": {
"width": "160px",
"height": "160px",
"background-color": "#666666",
"overflow": "hidden"
},
"moduleContentNode": {
"height": "130px",
"padding": "5px 0px",
"cursor": "pointer"
},
"moduleNameNode": {
"height": "40px",
"line-height": "20px",
"padding": "0px 10px",
"font-size": "16px",
"font-weight": "bold",
"color": "#333333",
},
"moduleCategoryNode": {
"padding": "5px 10px 0px 10px",
"height": "20px",
"line-height": "20px",
"font-size": "12px",
"color": "#333333"
},
"moduleDescriptionNode": {
"height": "36px",
"line-height": "18px",
"font-size": "12px",
"padding": "0px 10px",
"color": "#999999"
},
"moduleActionNode": {
"height": "28px",
"border": "1px solid #999999",
"line-height": "28px",
"font-size": "14px",
"color": "#ffffff",
"background-color": "#4c6b87",
"cursor": "pointer",
"text-align": "center"
},
"moduleLoadingAreaNode": {
"margin": "auto",
"width": "100px"
},
"moduleLoadingImgNode": {
"margin-top": "60px",
"margin-bottom": "60px",
"width": "100px",
"height": "100px",
"border": "0px"
},
"moduleSetupContentNode": {
"width": "90%",
"margin": "auto",
"overflow": "hidden"
},
"moduleSetupTitleNode": {
"margin-top": "10px",
"height": "130px",
"background-color": "#ffffff"
},
"moduleSetupIconAreaNode": {
"width": "130px",
"height": "130px",
"background-color": "#666666",
"overflow": "hidden",
"float": "left"
},
"moduleSetupIconNode": {
"width": "130px",
"height": "130px",
"background": "url(../x_component_AppMarket/$Main/default/icon/logo1.png) center center no-repeat"
},
"moduleSetupTitleContentNode": {
"margin-left": "140px",
"padding-top": "10px",
"padding-bottom": "10px",
"height": "110px"
},
"moduleSetupNameNode": {
"height": "30px",
"line-height": "30px",
"font-size": "16px",
"font-weight": "bold",
"color": "#333333"
},
"moduleSetupCategoryNode": {
"height": "20px",
"line-height": "20px",
"font-size": "12px",
"color": "#777777"
},
"moduleSetupDescriptionNode": {
"height": "40px",
"line-height": "20px",
"font-size": "12px",
"color": "#999999"
},
"moduleSetupCompareContentNode": {
//"border": "1px solid #cccccc",
"margin": "10px auto",
"overflow": "hidden"
},
"moduleSetupContentInforNode": {
"height": "36px",
"line-height": "36px",
"color": "#666666",
"font-size": "14px",
"padding-left": "6px"
},
"moduleSetupListAreaTitleNode": {
"height": "30px",
"line-height": "30px",
"background-color": "#dddddd",
"color": "#333333",
"padding-left": "10px",
"font-weight": "bold",
"font-size": "14px"
},
"moduleSetupListAreaContentNode": {
"min-height": "30px",
"background-color": "#ffffff"
},
"moduleSetupListContentNode": {
"height": "36px",
"line-height": "36px",
"margin": "0px 10px",
"font-size": "14px",
"color": "#666666",
"border-bottom": "1px solid #eeeeee"
},
moduleSetupListIconNode: {
"height": "36px",
"float": "left",
"width": "36px"
},
moduleSetupListNameNode: {
"height": "36px",
"margin-right": "160px",
"margin-left": "36px"
},
moduleSetupListActionNode: {
"height": "36px",
"float": "right",
"width": "60px"
},
moduleSetupListInforNode: {
"height": "36px",
"float": "right",
"width": "100px"
},
"moduleSetupListActionSelectNode": {
"border": "1px solid #333333"
}
}
\ No newline at end of file
<div class="o2_appmarket_recommend_in" data-o2-element="topRecommendContent">
<div class="o2_appmarket_recommendLeft" data-o2-element="leftCoverNode">
<div class="o2_appmarket_recommendBiggestPic" data-o2-element="recommendBiggestPic"></div>
<div class="o2_appmarket_recommendBiggestMask"></div>
<div class="o2_appmarket_recommendBiggestTitle" data-o2-element="recommendBiggestTitle"></div>
</div>
<div class="o2_appmarket_recommendRight" data-o2-element="rightCoverNode">
<div class="o2_appmarket_recommendRightTop" data-o2-element="rightTopCoverNode">
<div class="o2_appmarket_recommendRightTopPic" data-o2-element="recommendRightTopPic"></div>
<div class="o2_appmarket_recommendRightTopMask"></div>
<div class="o2_appmarket_recommendRightTitle" data-o2-element="recommendRightTopTitle"></div>
</div>
<div style="clear:both;"></div>
<div class="o2_appmarket_recommendRightBottom" data-o2-element="rightBottomCoverNode">
<div class="o2_appmarket_recommendRightBottomPic" data-o2-element="recommendRightBottomPic"></div>
<div class="o2_appmarket_recommendRightBottomMask"></div>
<div class="o2_appmarket_recommendRightTitle" data-o2-element="recommendRightBottomTitle"></div>
</div>
</div>
</div>
.o2_appmarket_content {
margin: 40px 20px 0px 40px;
width:100%;
min-width: 1280px;
min-height: 700px;
font-size: 14px;
overflow: auto;
}
.o2_appmarket_recommend {
min-width: 1280px;
min-height: 320px;
height: 40%;
}
.o2_appmarket_recommend_in{
height:100%;
}
.o2_appmarket_app {
min-width: 1280px;
min-height: 380px;
height: 55%;
}
.o2_appmarket_recommendLeft {
float: left;
width:65%;
height:100%;
border-radius:16px;
border:1px solid rgba(151,151,151,1);
margin:0px 10px 0px 0px;
position:relative;
cursor: pointer;
}
.o2_appmarket_recommendBiggestPic{
width:100%;
height:100%;
border-radius:16px;
border:1px solid rgba(151,151,151,1);
position:absolute;
left:0px;
top:0px;
background-size:cover;
}
.o2_appmarket_recommendBiggestMask{
width:100%;
height:100%;
background:linear-gradient(180deg,rgba(0,0,0,0) 0%,rgba(0,0,0,0.5) 100%);
border-radius:16px;
position:absolute;
left:0px;
top:0px;
}
.o2_appmarket_recommendBiggestTitle{
width:100%;
height:31px;
font-size:24px;
font-family:MicrosoftYaHei;
color:rgba(255,255,255,1);
line-height:31px;
position:absolute;
text-align: center;
top:90%;
}
.o2_appmarket_recommendRight {
float: left;
height: 100%;
width: 35%;
margin-right:40px;
}
.o2_appmarket_recommendRightTop {
height: 49%;
position: relative;
cursor: pointer;
}
.o2_appmarket_recommendRightTopPic{
width:100%;
height:100%;
border-radius:16px;
border:1px solid rgba(151,151,151,1);
position:absolute;
left:0px;
top:0px;
background-size:cover;
}
.o2_appmarket_recommendRightTopMask{
width:100%;
height:100%;
background:linear-gradient(180deg,rgba(0,0,0,0) 0%,rgba(0,0,0,0.5) 100%);
border-radius:16px;
position:absolute;
left:0px;
top:0px;
}
.o2_appmarket_recommendRightTitle{
width:100%;
height:31px;
font-size:24px;
font-family:MicrosoftYaHei;
color:rgba(255,255,255,1);
line-height:31px;
position:absolute;
text-align:center;
top:82%;
}
.o2_appmarket_recommendRightBottom {
height: 49%;
margin-top:10px;
position: relative;
cursor: pointer;
}
.o2_appmarket_recommendRightBottomPic{
width:100%;
height:100%;
border-radius:16px;
border:1px solid rgba(151,151,151,1);
position:absolute;
left:0px;
top:0px;
background-size:cover;
}
.o2_appmarket_recommendRightBottomMask{
width:100%;
height:100%;
background:linear-gradient(180deg,rgba(0,0,0,0) 0%,rgba(0,0,0,0.5) 100%);
border-radius:16px;
position:absolute;
left:0px;
top:0px;
}
.o2_appmarket_appcategorys{
text-align:center;
margin-top:60px;
margin-bottom:40px;
display: flex;
justify-content: center;
}
.o2_appmarket_appcategory_current{
color: #4A90E2;
border-color: #4A90E2;
cursor: pointer;
width:80px;
height:26px;
font-size:20px;
font-family:MicrosoftYaHei;
line-height:26px;
margin:40px 20px 40px 20px;
}
.o2_appmarket_appcategory_tab_over {
border-bottom: 1px solid rgba(151,151,151,1);
}
.o2_appmarket_appcategory{
width:80px;
height:26px;
font-size:20px;
font-family:MicrosoftYaHei;
color:rgba(51,51,51,1);
line-height:26px;
margin:40px 20px 40px 20px;
cursor: pointer;
}
.o2_appmarket_app_search_box{
height: 28px;
width: 268px;
border-radius: 20px;
border: 1px solid #DDDDDD;
}
.o2_appmarket_app_search_box_icon{
float: right;
height: 28px;
width: 36px;
background-position: center;
background-repeat: no-repeat;
cursor: pointer;
}
.o2_appmarket_app_icon_search{
background-image: url(../o2_core/o2/xDesktop/$Default/blue/icons/icon_sousuo.png) !important;
}
.o2_appmarket_app_icon_clear{
background-image: url(../o2_core/o2/xDesktop/$Default/blue/icons/icon_clear.png) !important;
}
.o2_appmarket_app_area_search_clear{
float: right;
height: 28px;
width: 16px;
background-image: none;
background-position: center;
background-repeat: no-repeat;
}
.o2_appmarket_app_search_inputArea{
height: 28px;
border-radius: 20px;
padding: 0 10px;
margin-right: 52px;
}
.o2_appmarket_app_searchinput{
height: 26px;
width: 99%;
line-height: 26px;
border: 0;
border-radius: 20px;
float: left;
}
.o2_appmarket_applist{
min-width: 1280px;
min-height: 380px;
height: 60%;
}
.o2_appmarket_appcategory_count{
height:28px;
font-size:18px;
font-family:MicrosoftYaHei;
color:rgba(74,144,226,1);
line-height:24px;
margin:20px 80px 20px 0px;
float:right;
}
.o2_appmarket_application{
width:285px;
height:555px;
background:rgba(255,255,255,1);
box-shadow:0px 0px 8px 0px rgba(0,0,0,0.25);
border-radius:16px;
float:left;
margin-bottom:30px;
cursor: pointer;
}
.o2_appmarket_application_icon{
height:70%;
border-top-left-radius: 16px;
border-top-right-radius: 16px;
background-size:cover;
}
.o2_appmarket_application_info{
height:30%;
width:90%;
margin:20px 20px auto 20px;
}
.o2_appmarket_application_info_name{
width:100%;
height:26px;
font-size:20px;
font-family:MicrosoftYaHei;
color:rgba(51,51,51,1);
line-height:26px;
overflow: hidden;
}
.o2_appmarket_application_info_recommend{
width:100%;
height:24px;
font-size:18px;
font-family:MicrosoftYaHei;
color:rgba(102,102,102,1);
line-height:24px;
margin-bottom:20px;
}
.o2_appmarket_application_info_starpic{
width:14px;
height:13px;
}
.o2_appmarket_application_info_category{
width:64px;
height:19px;
font-size:14px;
font-family:MicrosoftYaHei;
color:rgba(153,153,153,1);
line-height:19px;
}
.o2_appmarket_application_info_searchinput{
height: 26px;
line-height: 26px;
border: 0;
border-radius: 20px;
float: left;
}
.o2_appmarket_application_info_bottom{
}
.o2_appmarket_application_info_bottom_free{
width:34px;
height:24px;
font-size:16px;
font-family:MicrosoftYaHei;
color:rgba(51,51,51,1);
line-height:21px;
float:left;
}
.o2_appmarket_application_info_bottom_button{
width:70px;
height:24px;
background:rgba(74,144,226,1);
border-radius:20px;
float:right;
text-align: center;
cursor: pointer;
}
.o2_appmarket_application_info_bottom_button_text{
height:17px;
font-size:12px;
font-family:MicrosoftYaHei;
color:rgba(255,255,255,1);
line-height:16px;
margin:4px auto 3px auto;
}
.moduleLoading {
margin: "auto";
width: "100px";
z-index:9999999999;
},
\ No newline at end of file
<div class="o2_appmarket_content" data-o2-element="marketnode">
<div class="o2_appmarket_recommend" data-o2-element="topRecommendNode">
</div>
<div style="clear:both;"></div>
<div class="o2_appmarket_app" data-o2-element="applicationsNode">
</div>
</div>
MWF.xApplication.AppMarketV2.ApplicationsContent = new Class({
Implements: [Options, Events],
options: {
"view": "applicationsContent.html"
},
initialize: function(app, container, options){
this.setOptions(options);
this.app = app;
this.container = container;
this.viewPath = this.app.path+this.app.options.style+"/"+this.options.view;
debugger;
this.querydata = {};
this.currentcategory = {"name":"全部","count":0};
this.load();
},
load: function(){
debugger;
this.container.loadHtml(this.viewPath, {"bind": {"lp": this.app.lp}, "module": this}, function(){
this.loadApplication(function(){
this.fireEvent("load");
}.bind(this));
}.bind(this));
},
loadApplication: function(callback){
debugger;
if (!this.isLoading){
if (!this.applicationsContentV){
this.applicationsContentV = new MWF.xApplication.AppMarketV2.ApplicationsContent.Applications(this, {
"onLoad": function(){ if (callback) callback(); }
});
}else{
this.applicationsContentV.load();
}
}
},
focusAppSearch: function(){
this.searchAppNode.addClass("layout_content_taskbar_area_search_box_focus");
this.searchAppNode.addClass("mainColor_border");
this.searchAppIconNode.addClass("icon_search_focus");
},
blurAppSearch: function(){
this.searchAppNode.removeClass("layout_content_taskbar_area_search_box_focus");
this.searchAppNode.removeClass("mainColor_border");
this.searchAppIconNode.removeClass("icon_search_focus");
},
searchAppInputKeyDown: function(e){
if (this.searchAppInputNode.get("value")){
this.searchAppClearNode.addClass("icon_clear");
}else{
this.searchAppClearNode.removeClass("icon_clear");
}
if (e.keyCode===13) this.doSearch();
},
clearAppSearch: function(){
this.searchAppInputNode.set("value", "");
this.searchAppClearNode.removeClass("icon_clear");
this.clearSearchResult();
},
doAppSearch: function(){
var key = this.searchAppInputNode.get("value");
if (key){
this.querydata["name"]=key;
if (!this.applicationsContentV){
this.applicationsContentV = new MWF.xApplication.AppMarketV2.ApplicationsContent.Applications(this, {
"onLoad": function(){ if (callback) callback(); }
});
}else{
this.applicationsContentV.load();
}
}
},
clearSearchResult: function(){
this.querydata["name"]="";
if (!this.applicationsContentV){
this.applicationsContentV = new MWF.xApplication.AppMarketV2.ApplicationsContent.Applications(this, {
"onLoad": function(){ if (callback) callback(); }
});
}else{
this.applicationsContentV.load();
}
}
});
MWF.xApplication.AppMarketV2.ApplicationsContent.Applications= new Class({
Implements: [Options, Events],
options: {
"type": "applications"
},
initialize: function(content, options){
this.setOptions(options);
this.content = content;
this.app = this.content.app;
this.actions = this.app.actions;
this.container = this.content.container;
this.page = 1;
this.pageSize = 100;
this.load();
},
load: function(){
debugger;
this.loadAppCategorys();
this.loadApplications();
},
loadAppCategorys: function(){
debugger;
this.actions.MarketAction.listCategory(function(json){
if (json.data && json.data.valueList){
this.showCategorys(json.data.valueList);
}
this.fireEvent("load");
}.bind(this));
},
loadApplications: function(){
debugger;
this.emptyLoadContent();
this.actions.MarketAction.listPaging(this.page, this.pageSize, this.content.querydata,function(json){
if (json.data && json.data.length){
debugger;
this.content.currentcategory["name"] = this.content.querydata.category==""||!(this.content.querydata.category)?"全部":this.content.querydata.category;
this.content.currentcategory["count"] = json.count;
this.showApplications(json.data);
}
this.fireEvent("load");
}.bind(this));
},
reload: function(){
if (!this.content.isLoading) {
this.loadAppCategorys();
this.loadApplications();
}
},
emptyLoadContent: function(){
this.content.appList.empty();
//this.container.removeClass("o2_homepage_area_content_loading").removeClass("icon_loading");
//this.content.noItemNode = new Element("div.o2_appMarket_content_empty_node", {"text": this.app.lp.noRecommend}).inject(this.container);
//var m = (this.content.contentHeight- this.content.noItemNode.getSize().y)/2;
//this.content.noItemNode.setStyle("margin-top", ""+m+"px");
this.content.isLoading = false;
},
showCategorys:function(data){
debugger;
var categorysdiv = this.content.appCategory;
categorysdiv.empty();
this.loadCertainCategory(categorysdiv,"全部")
data.each(function(d,i){
this.loadCertainCategory(categorysdiv,d)
}.bind(this))
},
loadCertainCategory:function(categorysdiv,d){
debugger;
var _self = this;
var categorydiv = new Element("span",{"text":d,"class":"o2_appmarket_appcategory"}).inject(categorysdiv);
categorydiv.store("data",d);
categorydiv.addEvents({
"mouseover":function(){
debugger;
this.addClass("o2_appmarket_appcategory_tab_over");
},
"mouseout":function(){
this.removeClass("o2_appmarket_appcategory_tab_over");
},
"click":function(e){
var d = this.retrieve("data");
this.getParent().getElements(".o2_appmarket_appcategory_current").removeClass("mainColor_color").removeClass("o2_appmarket_appcategory_current").addClass("o2_appmarket_appcategory");
this.removeClass("o2_appmarket_appcategory").addClass("mainColor_color").addClass("o2_appmarket_appcategory_current");
if (d){
if (d=="全部"){
_self.content.querydata["category"]="";
}else{
_self.content.querydata["category"]=d;
}
_self.loadApplications();
}
}
})
},
showApplications: function(data){
debugger;
//show category count
this.content.appCategory_count.empty();
new Element("div",{"text":this.content.currentcategory.name+"("+this.content.currentcategory.count+")"}).inject(this.content.appCategory_count);
var appsdiv = this.content.appList;
var appsdivwidth= appsdiv.clientWidth-80;
//appwidth = (appsdivwidth-200)/7;
rowappnum = parseInt(appsdivwidth/285);
rowappmargin = (appsdivwidth/285-rowappnum) * 285 / (rowappnum-1);
if (rowappmargin<10){
rowappnum = rowappnum -1;
rowappmargin = (appsdivwidth/285-rowappnum) * 285 / (rowappnum-1)
}
debugger;
//appsdiv.setStyle("width","calc("+appwidth+"px)");
//appsdiv.setStyle("margin-left","10px");
data.each(function(d, i){
this.loadCertainApplication(appsdiv, d, i,rowappnum,rowappmargin);
}.bind(this));
},
loadCertainApplication: function(appsdiv, d, i,rowappnum,rowappmargin){
debugger;
//app 排列 begin
var applicationdiv = new Element("div",{"class":"o2_appmarket_application"}).inject(appsdiv);
if ((i+1)%rowappnum!=0){
applicationdiv.setStyle("margin-right",rowappmargin+"px");
}else{
applicationdiv.setStyle("margin-right","40px");
}
var applicationicon = new Element("div",{"class":"o2_appmarket_application_icon"}).inject(applicationdiv);
applicationicon.setStyle("background-image", "url(data:image/png;base64,"+d.icon+")");
var applicationinfo = new Element("div",{"class":"o2_appmarket_application_info"}).inject(applicationdiv);
var applicationinfo_name = new Element("div",{"text":d.name,"class":"o2_appmarket_application_info_name"}).inject(applicationinfo);
//var applicationinfo_recommend = new Element("div",{"text":d.recommend,"class":"o2_appmarket_application_info_recommend"}).inject(applicationinfo);
//推荐指数改为显示评星
var applicationinfo_star = new Element("div",{"class":"o2_appmarket_application_info_recommend"}).inject(applicationinfo);
var grade = d.grade;
var intgrade = parseInt(grade);
var dotgrade = grade - intgrade;
for (var tmpnum=0;tmpnum<intgrade;tmpnum++){
new Element("img",{"src":this.app.iconPath+"blackfiveangular.png","class":"o2_appmarket_application_info_starpic"}).inject(applicationinfo_star)
}
if (dotgrade>=0.5){
new Element("img",{"src":this.app.iconPath+"halffiveangular.png","class":"o2_appmarket_application_info_starpic"}).inject(applicationinfo_star);
intgrade++;
}
for (var tmpnum=0;tmpnum<5-intgrade;tmpnum++){
new Element("img",{"src":this.app.iconPath+"whitefiveangular.png","class":"o2_appmarket_application_info_starpic"}).inject(applicationinfo_star);
}
var applicationinfo_category = new Element("div",{"text":d.category,"class":"o2_appmarket_application_info_category"}).inject(applicationinfo);
var applicationinfo_bottom = new Element("div",{"class":"o2_appmarket_application_info_bottom"}).inject(applicationinfo);
var applicationinfo_bottom_free = new Element("div",{"text":d.price==0?"Free":d.price+"","class":"o2_appmarket_application_info_bottom_free"}).inject(applicationinfo_bottom);
var applicationinfo_bottom_open = new Element("div",{"class":"o2_appmarket_application_info_bottom_button mainColor_bg"}).inject(applicationinfo_bottom);
var bottomtext =this.app.lp.setup;
if (d.installedVersion && d.installedVersion!=""){
if (d.installedVersion==d.version){
bottomtext = this.app.lp.setupDone;
}else{
bottomtext = this.app.lp.update;
}
}
var applicationinfo_bottom_open_text = new Element("div",{"text":bottomtext,"class":"o2_appmarket_application_info_bottom_button_text"}).inject(applicationinfo_bottom_open);
var _self = this;
applicationicon.store("data", d);
applicationicon.addEvents({
"mouseover": function(){
},
"mouseout": function(){
},
"click": function(e){
var d = this.retrieve("data");
if (d) {
_self.open(e, d);
}
}
})
applicationinfo_bottom_open.store("data",d);
applicationinfo_bottom_open.addEvents({
"click":function(e){
var d = this.retrieve("data");
if (d){
_self.installapp(e,d);
}
}
})
},
installapp:function(e,d){
var p = e.target.getPosition();
var tmpe = {"event": {"x": p.x+40, "y": p.y}};
var confirmtitle = d.installedVersion==""?this.app.lp.confirmsetupTitle:this.app.lp.confirmupdateTitle;
var confirmcontent = d.installedVersion==""?this.app.lp.confirmsetupContent:this.app.lp.confirmupdateContent;
var _self = this;
MWF.xDesktop.confirm("warn", tmpe, confirmtitle, confirmcontent, 300, 120, function(){
_self.app.mask();
//this.createLoading(this.container,true);
//alert("after createLoading")
_self.actions.MarketAction.installOrUpdate(
d.id,
function( json ){
data = json.data;
_self.app.notice(d.name+" "+_self.app.lp.setupSuccess, "success");
_self.app.unmask();
//this.clearLoading()
}.bind(_self),
function( json ){
data = json.data;
debugger;
_self.app.unmask();
//this.clearLoading()
}.bind(_self),
true
);
this.close();
}, function(){
this.close();
}, null, null, "o2");
},
open: function(e, d){
var apppar = {};
apppar["appid"] = d.id;
layout.openApplication(e, "AppMarketV2.Application", apppar);
},
createLoading: function(node,mask){
debugger;
//alert("createloading")
this.app.content.mask({
"destroyOnHide": true,
"style": {
"opacity": 0.7,
"background-color": "#999"
},
"loading": true
});
//if (mask) this.mask.loadNode(node);
},
clearLoading: function(){
/*
if (this.loadingAreaNode){
this.loadingAreaNode.destroy();
this.loadingAreaNode = null;
}
*/
this.app.content.unmask();
// this.dlg.button.setStyle("display", "block");
}
});
\ No newline at end of file
MWF.require("MWF.widget.MaskNode", null, false);
o2.requireApp("AppMarketV2", "RecommendContent", null, false);
MWF.xApplication.AppMarketV2.Main = new Class({
Extends: MWF.xApplication.Common.Main,
Implements: [Options, Events],
options: {
"style": "default",
"mvcStyle": "style.css",
"name": "AppMarketV2",
"icon": "icon.png",
"width": "1000",
"height": "700",
"isResize": true,
"isMax": true,
"title": MWF.xApplication.AppMarketV2.LP.title,
"minHeight": 700
},
onQueryLoad: function(){
this.lp = MWF.xApplication.AppMarketV2.LP;
this.actions = MWF.Actions.load("x_program_center");
this.viewPath = this.path+this.options.style+"/view.html";
this.iconPath = this.path+this.options.style+"/icon/";
},
mask: function(){
if (!this.maskNode){
this.maskNode = new MWF.widget.MaskNode(this.marketnode, {"style": "bam"});
this.maskNode.load();
}
},
unmask: function(){
if (this.maskNode) this.maskNode.hide(function(){
MWF.release(this.maskNode);
this.maskNode = null;
}.bind(this));
},
loadApplication: function(callback){
this.content.loadHtml(this.viewPath, {"bind": {"lp": this.lp}, "module": this}, function(){
if (!this.options.isRefresh){
this.maxSize(function(){
this.loadApp(callback);
}.bind(this));
}else{
this.loadApp(callback);
}
}.bind(this));
},
loadApp: function(callback){
//this.initNode();
this.initNodeSize();
this.recommondLoaded = false;
this.applicationsLoaded = true;
this.loadRecommondContent(function(){ this.recommondLoaded = true; this.checkAppLoaded(callback); }.bind(this));
this.loadApplicationsContent(function(){ this.applicationsLoaded = true; this.checkAppLoaded(callback); }.bind(this));
},
checkAppLoaded: function(callback){
if (this.recommondLoaded && this.applicationsLoaded){
if (callback) callback();
}
},
initNodeSize: function(){
this.resizeNodeSize();
this.addEvent("resize", this.resizeNodeSize.bind(this));
},
resizeNodeSize: function(){
var size = this.content.getSize();
var edge = this.marketnode.getEdgeHeight();
var height = size.y - edge;
if (height<this.options.minHeight) height = this.options.minHeight;
this.marketnode.setStyle("height", ""+height+"px");
},
loadRecommondContent: function(callback){
debugger;
this.recommendContent = new MWF.xApplication.AppMarketV2.RecommendContent(this, this.topRecommendNode, {
"onLoad": function(){if (callback) callback();}
});
},
loadApplicationsContent: function(callback){
o2.requireApp("AppMarketV2", "ApplicationsContent", function(){
this.applicationsContent = new MWF.xApplication.AppMarketV2.ApplicationsContent(this, this.applicationsNode, {
"onLoad": function(){if (callback) callback();}
});
}.bind(this));
}
});
MWF.xApplication.AppMarketV2.RecommendContent = new Class({
Implements: [Options, Events],
options: {
"view": "recommendContent.html"
},
initialize: function(app, container, options){
this.setOptions(options);
this.app = app;
this.container = container;
this.viewPath = this.app.path+this.app.options.style+"/"+this.options.view;
debugger;
this.load();
},
load: function(){
debugger;
this.container.loadHtml(this.viewPath, {"bind": {"lp": this.app.lp}, "module": this}, function(){
this.loadRecommend(function(){
this.fireEvent("load");
}.bind(this));
}.bind(this));
},
loadRecommend: function(callback){
debugger;
if (!this.isLoading){
if (!this.topRecommendContentV){
this.topRecommendContentV = new MWF.xApplication.AppMarketV2.RecommendContent.Recommend(this, {
"onLoad": function(){ if (callback) callback(); }
});
}else{
this.topRecommendContentV.load();
}
}
}
});
MWF.xApplication.AppMarketV2.RecommendContent.Recommend= new Class({
Implements: [Options, Events],
options: {
"type": "recommend"
},
initialize: function(content, options){
this.setOptions(options);
this.content = content;
this.app = this.content.app;
this.actions = this.app.actions;
this.container = this.content.container;
this.page = 1;
this.pageSize = 3;
this.querydata = {"orderBy":"recommend","isAsc":"true"};
this.load();
},
load: function(){
debugger;
this.loadItemsRes();
},
loadItemsRes: function(){
debugger;
this.actions.MarketAction.listPaging(this.page, this.pageSize, this.querydata,function(json){
if (json.data && json.data.length){
this.loadItems(json.data);
}else{
this.emptyLoadContent();
}
this.fireEvent("load");
}.bind(this));
},
reload: function(){
if (!this.content.isLoading) {
this.loadItemsRes();
}
},
emptyLoadContent: function(){
this.container.empty();
this.container.removeClass("o2_homepage_area_content_loading").removeClass("icon_loading");
//this.itemContentNode.addClass("o2_homepage_task_area_content_empty").addClass("icon_notask");
this.content.noItemNode = new Element("div.o2_appMarket_content_empty_node", {"text": this.app.lp.noRecommend}).inject(this.container);
var m = (this.content.contentHeight- this.content.noItemNode.getSize().y)/2;
this.content.noItemNode.setStyle("margin-top", ""+m+"px");
this.content.isLoading = false;
},
loadItems: function(data){
debugger;
var recommendWidth = this.content.topRecommendContent.clientWidth;
var recommendLeftWidth = (recommendWidth - 80-10)*0.65;
var recommendRightWidth = (recommendWidth - 80-10)*0.35;
this.content.leftCoverNode.setStyle("width",recommendLeftWidth+"px");
this.content.rightCoverNode.setStyle("width",recommendRightWidth+"px");
data.each(function(d, i){
this.loadItem(d, i);
}.bind(this));
},
loadItem: function(d, i){
var app;
var apppar;
debugger;
if (i==0){
app = this.content.recommendBiggestPic;
apptext = this.content.recommendBiggestTitle;
apppar = this.content.leftCoverNode;
}
if (i==1){
app = this.content.recommendRightTopPic;
apptext = this.content.recommendRightTopTitle;
apppar = this.content.rightTopCoverNode;
}
if (i==2){
app = this.content.recommendRightBottomPic;
apptext = this.content.recommendRightBottomTitle;
apppar = this.content.rightBottomCoverNode;
}
//获取对应indexPic图片
this.actions.MarketAction.getCoverPic(d.id,function(json){
debugger;
if (json.data && json.data.value){
app.setStyle("background-image", "url(data:image/png;base64,"+json.data.value+")");
}
}.bind(this));
apptext.set("text",d.name);
var _self = this;
apppar.store("data", d);
apppar.addEvents({
"mouseover": function(){
},
"mouseout": function(){
},
"click": function(e){
var d = this.retrieve("data");
if (d) {
_self.open(e, d);
}
}
})
},
open: function(e, d){
debugger;
var apppar = {};
apppar["appid"] = d.id;
layout.openApplication(e, "AppMarketV2.Application", apppar);
},
});
\ No newline at end of file
MWF.xApplication.AppMarketV2.LP = {
"title": "应用市场V2",
"implodeLocal": "从本地导入",
"download": "免费下载",
"setupTitle": "即将安装",
"ok": "确定",
"cancel": "取消",
"downloadInfor": "即将下载安装以下模块:",
"setup": "安装",
"setupDone":"已安装",
"update":"更新",
"conflict": "冲突",
"ignore": "忽略",
"create": "新建",
"cover": "覆盖",
"name": "名称",
"id": "ID",
"setupSuccess": "应用安装成功!",
"localApp": "本地应用",
"confirmsetupTitle":"安装提示",
"confirmsetupContent":"您确认安装本应用么?",
"confirmupdateTitle":"更新提示",
"confirmupdateContent":"您确认更新本应用么?如果安装应用后改过本应用,本次更新后会被替换"
};
\ No newline at end of file
<div class="o2_appmarket_application_comment" data-o2-element="commentnode">
<div class="o2_appmarket_application_comment_top" data-o2-element="applicationcommenttop">
<div class="o2_appmarket_application_comment_top_left" data-o2-element="applicationcommenttop">
<div class="o2_appmarket_application_comment_top_left_grade" data-o2-element="applicationcommenttopgrade"></div>
<div class="o2_appmarket_application_comment_top_left_angular" data-o2-element="applicationcommenttopangular"></div>
</div>
<div class="o2_appmarket_application_comment_top_right" data-o2-element="applicationcommentright">
<div class="o2_appmarket_application_comment_top_right_graderatio" data-o2-element="applicationcommentrightfive"></div>
<div style="clear:both;"></div>
<div class="o2_appmarket_application_comment_top_right_graderatio" data-o2-element="applicationcommentrightfour"></div>
<div style="clear:both;"></div>
<div class="o2_appmarket_application_comment_top_right_graderatio" data-o2-element="applicationcommentrightthree"></div>
<div style="clear:both;"></div>
<div class="o2_appmarket_application_comment_top_right_graderatio" data-o2-element="applicationcommentrighttwo"></div>
<div style="clear:both;"></div>
<div class="o2_appmarket_application_comment_top_right_graderatio" data-o2-element="applicationcommentrightone"></div>
<div style="clear:both;"></div>
</div>
</div>
<div style="clear:both;"></div>
<div class="o2_appmarket_application_comment_middle" data-o2-element="applicationcommentmiddle">
</div>
<div style="clear:both;"></div>
<div class="o2_appmarket_application_comment_bottom" data-o2-element="applicationcommentbottom">
</div>
</div>
<div class="o2_appmarket_application_introduce" data-o2-element="introducenode">
<div class="o2_appmarket_application_introduce_top" data-o2-element="applicationintroducetop">
<div class="o2_appmarket_application_introduce_iconcontain" data-o2-element="applicationintroduceiconcontain">
</div>
<div class="o2_appmarket_application_introduce_memo" data-o2-element="applicationintroducememo">
<div class="o2_appmarket_application_introduce_memo_free" data-o2-element="applicationintroducememofree"></div>
<div class="o2_appmarket_application_introduce_memo_name" data-o2-element="applicationintroducememoname"></div>
<div class="o2_appmarket_application_introduce_memo_remark" data-o2-element="applicationintroducememoremark">
<div class="o2_appmarket_application_introduce_memo_remark_inner" data-o2-element="applicationintroducememoremarkgrade"></div>
<div class="o2_appmarket_application_introduce_memo_remark_inner" data-o2-element="applicationintroducememoremarkiconangular"></div>
<div class="o2_appmarket_application_introduce_memo_remark_inner" data-o2-element="applicationintroducememoremarkcommentcount"></div>
</div>
<div class="o2_appmarket_application_introduce_memo_download" data-o2-element="applicationintroducememodownload"></div>
<div class="o2_appmarket_application_introduce_memo_category" data-o2-element="applicationintroducememocategory"></div>
<div class="o2_appmarket_application_introduce_memo_content" data-o2-element="applicationintroducememocontent"></div>
</div>
<div class="o2_appmarket_application_introduce_download" data-o2-element="applicationintroducedownload">
<div class="o2_appmarket_application_introduce_download_price" data-o2-element="applicationintroducedownloadprice"></div>
<div class="o2_appmarket_application_introduce_download_downbtn mainColor_bg" data-o2-element="applicationintroducedownloadbtn">
<div class="o2_appmarket_application_introduce_download_downbtn_text" data-o2-element="applicationintroducedownloadbtntext"></div>
</div>
</div>
</div>
<div style="clear:both;"></div>
<div class="o2_appmarket_application_introduce_bottom" data-o2-element="applicationintroducebottom">
<div class="o2_appmarket_application_introduce_tabdiv">
<span class="o2_appmarket_application_introduce_tab" data-o2-element="applicationintroducesinfoTab" data-o2-events="click:loadIntroduceInfo;mouseover:tabover;mouseout:tabout">{{$.lp.appInfoTab}}</span>
<span class="o2_appmarket_application_introduce_tab" data-o2-element="applicationintroducedemandTab" data-o2-events="click:loadIntroduceDemand;mouseover:tabover;mouseout:tabout">{{$.lp.appDemandTab}}</span>
<span class="o2_appmarket_application_introduce_tab" data-o2-element="applicationintroducecommentTab" data-o2-events="click:loadIntroduceComment;mouseover:tabover;mouseout:tabout">{{$.lp.appCommentTab}}</span>
</div>
<div class="o2_appmarket_application_introduce_contentdiv" data-o2-element="applicationintroducecontentdiv">
<div class="o2_appmarket_application_introduce_content" data-o2-element="applicationintroducecontent"></div>
<div class="o2_appmarket_application_introduce_picsdiv" data-o2-element="applicationintroducepicsdiv">
<div class="o2_appmarket_application_introduce_picslable" data-o2-element="applicationintroducepicslable">屏幕截图</div>
<div class="o2_appmarket_application_introduce_pics" data-o2-element="applicationintroducepics"></div>
</div>
</div>
</div>
</div>
{
"titleBar": {
"overflow": "hidden",
"height": "50px",
"background-color": "#4c6b87"
},
"titleActionNode": {
"float": "right",
"margin-right": "20px",
"height": "26px",
"border": "1px solid #ffffff",
"border-radius": "5px",
"line-height": "26px",
"text-align": "center",
"padding": "0 20px",
"margin-top": "12px",
"cursor": "pointer",
"color": "#ffffff"
},
"titleTextNode": {
"padding-left": "20px",
"color": "#FFF",
"font-size": "18px",
"line-height": "50px",
"font-weight": "bold",
"width": "160px",
"float": "left"
},
"contentNode": {
"overflow": "auto",
"background-color": "#eeeeee"
},
"contentModuleArea": {
"width": "90%",
"margin": "20px auto",
"overflow": "hidden"
},
"moduleNode": {
"width": "160px",
"height": "300px",
"float": "left",
"background-color": "#f5f5f5",
"margin": "20px 5px"
},
"moduleIconNode": {
"width": "160px",
"height": "160px",
"background-image": "url(../x_component_AppMarket/$Main/default/icon/logo1.png)",
"background-repeat": "no-repeat",
"background-position": "center"
},
"moduleIconAreaNode": {
"width": "160px",
"height": "160px",
"background-color": "#666666",
"overflow": "hidden"
},
"moduleContentNode": {
"height": "130px",
"padding": "5px 0px",
"cursor": "pointer"
},
"moduleNameNode": {
"height": "40px",
"line-height": "20px",
"padding": "0px 10px",
"font-size": "16px",
"font-weight": "bold",
"color": "#333333",
},
"moduleCategoryNode": {
"padding": "5px 10px 0px 10px",
"height": "20px",
"line-height": "20px",
"font-size": "12px",
"color": "#333333"
},
"moduleDescriptionNode": {
"height": "36px",
"line-height": "18px",
"font-size": "12px",
"padding": "0px 10px",
"color": "#999999"
},
"moduleActionNode": {
"height": "28px",
"border": "1px solid #999999",
"line-height": "28px",
"font-size": "14px",
"color": "#ffffff",
"background-color": "#4c6b87",
"cursor": "pointer",
"text-align": "center"
},
"moduleLoadingAreaNode": {
"margin": "auto",
"width": "100px"
},
"moduleLoadingImgNode": {
"margin-top": "60px",
"margin-bottom": "60px",
"width": "100px",
"height": "100px",
"border": "0px"
},
"moduleSetupContentNode": {
"width": "90%",
"margin": "auto",
"overflow": "hidden"
},
"moduleSetupTitleNode": {
"margin-top": "10px",
"height": "130px",
"background-color": "#ffffff"
},
"moduleSetupIconAreaNode": {
"width": "130px",
"height": "130px",
"background-color": "#666666",
"overflow": "hidden",
"float": "left"
},
"moduleSetupIconNode": {
"width": "130px",
"height": "130px",
"background": "url(../x_component_AppMarket/$Main/default/icon/logo1.png) center center no-repeat"
},
"moduleSetupTitleContentNode": {
"margin-left": "140px",
"padding-top": "10px",
"padding-bottom": "10px",
"height": "110px"
},
"moduleSetupNameNode": {
"height": "30px",
"line-height": "30px",
"font-size": "16px",
"font-weight": "bold",
"color": "#333333"
},
"moduleSetupCategoryNode": {
"height": "20px",
"line-height": "20px",
"font-size": "12px",
"color": "#777777"
},
"moduleSetupDescriptionNode": {
"height": "40px",
"line-height": "20px",
"font-size": "12px",
"color": "#999999"
},
"moduleSetupCompareContentNode": {
//"border": "1px solid #cccccc",
"margin": "10px auto",
"overflow": "hidden"
},
"moduleSetupContentInforNode": {
"height": "36px",
"line-height": "36px",
"color": "#666666",
"font-size": "14px",
"padding-left": "6px"
},
"moduleSetupListAreaTitleNode": {
"height": "30px",
"line-height": "30px",
"background-color": "#dddddd",
"color": "#333333",
"padding-left": "10px",
"font-weight": "bold",
"font-size": "14px"
},
"moduleSetupListAreaContentNode": {
"min-height": "30px",
"background-color": "#ffffff"
},
"moduleSetupListContentNode": {
"height": "36px",
"line-height": "36px",
"margin": "0px 10px",
"font-size": "14px",
"color": "#666666",
"border-bottom": "1px solid #eeeeee"
},
moduleSetupListIconNode: {
"height": "36px",
"float": "left",
"width": "36px"
},
moduleSetupListNameNode: {
"height": "36px",
"margin-right": "160px",
"margin-left": "36px"
},
moduleSetupListActionNode: {
"height": "36px",
"float": "right",
"width": "60px"
},
moduleSetupListInforNode: {
"height": "36px",
"float": "right",
"width": "100px"
},
"moduleSetupListActionSelectNode": {
"border": "1px solid #333333"
}
}
\ No newline at end of file
.o2_appmarket_application_introduce {
margin: auto auto;
width:100%;
min-width: 1280px;
min-height: 700px;
font-size: 14px;
overflow: auto;
}
.o2_appmarket_application_introduce_top {
min-width: 1280px;
min-height: 530px;
height: 35%;
background:rgba(255,255,255,1);
border-radius:16px;
width:95%;
margin:auto auto;
}
.o2_appmarket_application_introduce_iconcontain{
width:16%;
height:100%;
margin:42px 20px 38px 20px;
position:relative;
float:left;
}
.o2_appmarket_application_introduce_icon{
width:300px;
height:450px;
border-radius:16px;
position:absolute;
left:0px;
top:0px;
background-size: cover;
}
.o2_appmarket_application_introduce_memo{
width:60%;
height:100%;
margin:42px 10px 38px 10px;
float:left;
}
.o2_appmarket_application_introduce_memo_free{
width:34px;
height:21px;
font-size:16px;
font-family:MicrosoftYaHei;
color:rgba(74,144,226,1);
line-height:21px;
}
.o2_appmarket_application_introduce_memo_name{
height:51px;
font-size:36px;
font-family:MicrosoftYaHei;
color:rgba(51,51,51,1);
line-height:47px;
overflow:hidden;
}
.o2_appmarket_application_introduce_memo_recommend{
width:437px;
height:51px;
font-size:36px;
font-family:MicrosoftYaHei;
color:rgba(51,51,51,1);
line-height:47px;
}
.o2_appmarket_application_introduce_memo_remark{
width:90%;
height:19px;
font-size:14px;
font-family:MicrosoftYaHei;
color:rgba(102,102,102,1);
line-height:19px;
}
.o2_appmarket_application_introduce_memo_category{
width:90%;
height:19px;
font-size:14px;
font-family:MicrosoftYaHei;
color:rgba(153,153,153,1);
line-height:19px;
margin-top:40px;
}
.o2_appmarket_application_introduce_memo_content{
width:870px;
height:280px;
font-size:18px;
font-family:MicrosoftYaHei;
color:rgba(51,51,51,1);
line-height:30px;
overflow: hidden;
}
.o2_appmarket_application_introduce_memo_remark_inner{
float:left;
margin:5px 5px;
}
.o2_appmarket_application_introduce_memo_remark_inner_pic{
margin-right:8px;
height:19px;
}
.o2_appmarket_application_introduce_memo_remark_inner_text{
width:22px;
height:24px;
font-size:18px;
font-family:MicrosoftYaHei;
color:rgba(102,102,102,1);
line-height:24px;
margin-left:8px;
}
.o2_appmarket_application_introduce_download{
width:16%;
height:100%;
margin:42px 10px 38px 10px;
float:left;
}
.o2_appmarket_application_introduce_download_price{
width:88px;
height:37px;
font-size:28px;
font-family:MicrosoftYaHei;
color:rgba(74,144,226,1);
line-height:37px;
margin:0px 0px 20px 20px;
}
.o2_appmarket_application_introduce_download_downbtn{
width:240px;
height:58px;
background:rgba(74,144,226,1);
border-radius:30px;
text-align: center;
}
.o2_appmarket_application_introduce_download_downbtn_text{
width:94px;
height:29px;
font-size:22px;
font-family:MicrosoftYaHei;
color:rgba(255,255,255,1);
line-height:29px;
padding-top:10px;
margin:auto auto;
}
.o2_appmarket_application_introduce_download_favbtn{
width:240px;
height:58px;
background:rgba(240,240,240,1);
border-radius:30px;
margin-top:58px;
text-align: center;
}
.o2_appmarket_application_introduce_download_favbtn_text{
width:143px;
height:29px;
font-size:22px;
font-family:MicrosoftYaHei;
color:rgba(102,102,102,1);
line-height:29px;
padding-top:10px;
margin:auto auto;
}
.o2_appmarket_application_introduce_bottom{
min-width: 1280px;
min-height: 800px;
height: 65%;
width:70%;
margin:auto auto;
}
.o2_appmarket_application_introduce_tabdiv{
height:128px;
background:rgba(216,216,216,0);
text-align: center;
}
.o2_appmarket_application_introduce_tab_current{
color: #4A90E2;
border-color: #4A90E2;
height:26px;
font-size:20px;
font-family:MicrosoftYaHei;
line-height:26px;
margin:40px 20px 40px 20px;
cursor: pointer;
}
.o2_appmarket_appcategory_tab_over {
border-bottom: 1px solid rgba(151,151,151,1);
}
.o2_appmarket_application_introduce_tab{
height:26px;
font-size:20px;
font-family:MicrosoftYaHei;
color:rgba(51,51,51,1);;
line-height:26px;
margin:40px 20px 40px 20px;
cursor: pointer;
}
.o2_appmarket_application_introduce_tab_current{
color:rgba(74,144,226,1);
}
.o2_appmarket_application_introduce_contentdiv{
width:100%;
min-height:672px;
background:rgba(216,216,216,0);
border-radius:6px;
margin:20px 0px 20px 20px;
}
.o2_appmarket_application_introduce_content{
width:100%;
height:70%;
}
.o2_appmarket_application_introduce_picslable{
width:200px;
height:30px;
font-size:28px;
font-family:MicrosoftYaHei-Bold,MicrosoftYaHei;
font-weight:bold;
color:rgba(51,51,51,1);
line-height:29px;
margin:50px 0px 30px 0px;
}
.o2_appmarket_application_introduce_pics{
width:100%;
height:10%;
}
.o2_appmarket_application_introduce_pic{
float:left;
width:280px;
height:158px;
margin:0px 20px 20px 0px;
border-radius: 16px;
}
.o2_appmarket_application_comment_top{
width:100%;
height:300px;
}
.o2_appmarket_application_comment_top_left{
width:19%;
height:230px;
float:left;
margin-right:1%
}
.o2_appmarket_application_comment_top_right{
width:80%;
float:left;
height:230px;
}
.o2_appmarket_application_comment_top_left_grade{
width:90%;
height:183px;
font-size:150px;
font-family:MicrosoftYaHeiLight;
color:rgba(51,51,51,1);
line-height:213px;
margin:auto auto;
}
.o2_appmarket_application_comment_top_right_graderatio{
}
.o2_appmarket_application_comment_top_right_graderatioItem{
float:left;
margin-top:26px;
margin-right:5px;
}
.o2_appmarket_application_comment_gradetotal{
width:85%;
height:14px;
border-radius:4px;
background:rgba(216,216,216,1);
float:left;
margin-top:26px;
margin-right:5px;
}
.o2_appmarket_application_comment_graderatio{
width:740px;
height:14px;
background:rgba(102,102,102,1);
border-radius:30px;
}
.o2_appmarket_application_comment_middle{
height:100px;
width:98%;
}
.o2_appmarket_application_comment_middle_commentbutton{
width:200px;
height:50px;
background:rgba(230,230,230,1);
border-radius:30px;
float:left;
text-align:center;
position:relative;
cursor: pointer;
}
.o2_appmarket_application_comment_middle_commentbutton_InnerSpan{
width:144px;
height:29px;
font-size:20px;
font-family:MicrosoftYaHei;
color:rgba(102,102,102,1);
line-height:29px;
left:26px;
top:5px;
position: absolute;
}
.o2_appmarket_application_comment_middle_tip{
width:420px;
height:21px;
font-size:16px;
font-family:MicrosoftYaHei;
color:rgba(102,102,102,1);
line-height:21px;
}
.o2_appmarket_application_comment_bottom{
width:98%;
}
.o2_appmarket_application_comment_content{
width:98%;
height:220px;
background:rgba(255,255,255,1);
border-radius:16px;
margin-top:20px;
}
.o2_appmarket_application_comment_content_right{
width:68%;
height:220px;
float:left;
margin-top:10px;
}
.o2_appmarket_application_comment_content_left_icon{
width: 72px;
height:72px;
float:left;
margin:0px 5px auto 10px;
}
.o2_appmarket_application_comment_content_left_name{
width:147px;
height:24px;
font-size:18px;
font-family:MicrosoftYaHei;
color:rgba(51,51,51,1);
line-height:24px;
float:left;
margin:20px 5px auto 0px;
}
.o2_appmarket_application_comment_content_left{
width:30%;
height:220px;
float:left;
margin-top:10px;
}
.o2_appmarket_application_comment_content_title{
width:399px;
height:26px;
font-size:20px;
font-family:MicrosoftYaHei;
color:rgba(51,51,51,1);
line-height:26px;
}
.o2_appmarket_application_comment_content_text{
width:90%;
height:58%;
font-size:16px;
font-family:MicrosoftYaHei;
color:rgba(51,51,51,1);
line-height:21px;
overflow: hidden;
}
.comment_dlg_title{
width:60px;
height:20px;
font-size:15px;
font-family:MicrosoftYaHei;
color:rgba(51,51,51,1);
line-height:20px;
margin: 10px 0px 10px 0px;
}
.comment_dlg_png{
float:left;
}
.comment_dlg_input_div{
float:left;
}
.comment_dlg_input{
width:600px;
height:200px;
background:rgba(255,255,255,1);
border-radius:10px;
border:1px solid rgba(222,222,222,1);
}
.comment_dlg_star{
margin-right: 15px;
hwidth:21px;
height:20px;
}
.comment_dlg_button_ok{
width:250px;
height:40px;
background:rgba(74,144,226,1);
border-radius:20px;
}
.comment_dlg_button_cancel{
width:130px;
height:40px;
background:rgba(240,240,240,1);
border-radius:20px;
}
\ No newline at end of file
/*!
* Viewer.js v1.3.5
* https://fengyuanchen.github.io/viewerjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2019-07-04T11:00:13.705Z
*/
.viewer-zoom-in::before,
.viewer-zoom-out::before,
.viewer-one-to-one::before,
.viewer-reset::before,
.viewer-prev::before,
.viewer-play::before,
.viewer-next::before,
.viewer-rotate-left::before,
.viewer-rotate-right::before,
.viewer-flip-horizontal::before,
.viewer-flip-vertical::before,
.viewer-fullscreen::before,
.viewer-fullscreen-exit::before,
.viewer-close::before {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAAAUCAYAAABWOyJDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAQPSURBVHic7Zs/iFxVFMa/0U2UaJGksUgnIVhYxVhpjDbZCBmLdAYECxsRFBTUamcXUiSNncgKQbSxsxH8gzAP3FU2jY0kKKJNiiiIghFlccnP4p3nPCdv3p9778vsLOcHB2bfveeb7955c3jvvNkBIMdxnD64a94GHMfZu3iBcRynN7zAOI7TG15gHCeeNUkr8zaxG2lbYDYsdgMbktBsP03jdQwljSXdtBhLOmtjowC9Mg9L+knSlcD8TNKpSA9lBpK2JF2VdDSR5n5J64m0qli399hNFMUlpshQii5jbXTbHGviB0nLNeNDSd9VO4A2UdB2fp+x0eCnaXxWXGA2X0au/3HgN9P4LFCjIANOJdrLr0zzZ+BEpNYDwKbpnQMeAw4m8HjQtM6Z9qa917zPQwFr3M5KgA6J5rTJCdFZJj9/lyvGhsDvwFNVuV2MhhjrK6b9bFiE+j1r87eBl4HDwCF7/U/k+ofAX5b/EXBv5JoLMuILzf3Ap6Z3EzgdqHMCuF7hcQf4HDgeoHnccncqdK/TvSDWffFXI/exICY/xZyqc6XLWF1UFZna4gJ7q8BsRvgd2/xXpo6P+D9dfT7PpECtA3cnWPM0GXGFZh/wgWltA+cDNC7X+AP4GzjZQe+k5dRxuYPeiuXU7e1qwLpDz7dFjXKRaSwuMLvAlG8zZlG+YmiK1HoFqT7wP2z+4Q45TfEGcMt01xLoNZEBTwRqD4BLpnMLeC1A41UmVxsXgXeBayV/Wx20rpTyrpnWRft7p6O/FdqzGrDukPNtkaMoMo3FBdBSQMOnYBCReyf05s126fU9ytfX98+mY54Kxnp7S9K3kj6U9KYdG0h6UdLbkh7poFXMfUnSOyVvL0h6VtIXHbS6nOP+s/Zm9mvyXW1uuC9ohZ72E9uDmXWLJOB1GxsH+DxPftsB8B6wlGDN02TAkxG6+4D3TWsbeC5CS8CDFce+AW500LhhOW2020TRjK3b21HEmgti9m0RonxbdMZeVzV+/4tF3cBpP7E9mKHNL5q8h5g0eYsCMQz0epq8gQrwMXAgcs0FGXGFRcB9wCemF9PkbYqM/Bas7fxLwNeJPdTdpo4itQti8lPMqTpXuozVRVXPpbHI3KkNTB1NfkL81j2mvhDp91HgV9MKuRIqrykj3WPq4rHyL+axj8/qGPmTqi6F9YDlHOvJU6oYcTsh/TYSzWmTE6JT19CtLTJt32D6CmHe0eQn1O8z5AXgT4sx4Vcu0/EQecMydB8z0hUWkTd2t4CrwNEePqMBcAR4mrBbwyXLPWJa8zrXmmLEhNBmfpkuY2102xxrih+pb+ieAb6vGhuA97UcJ5KR8gZ77K+99xxeYBzH6Q3/Z0fHcXrDC4zjOL3hBcZxnN74F+zlvXFWXF9PAAAAAElFTkSuQmCC');
background-repeat: no-repeat;
background-size: 280px;
color: transparent;
display: block;
font-size: 0;
height: 20px;
line-height: 0;
width: 20px;
}
.viewer-zoom-in::before {
background-position: 0 0;
content: 'Zoom In';
}
.viewer-zoom-out::before {
background-position: -20px 0;
content: 'Zoom Out';
}
.viewer-one-to-one::before {
background-position: -40px 0;
content: 'One to One';
}
.viewer-reset::before {
background-position: -60px 0;
content: 'Reset';
}
.viewer-prev::before {
background-position: -80px 0;
content: 'Previous';
}
.viewer-play::before {
background-position: -100px 0;
content: 'Play';
}
.viewer-next::before {
background-position: -120px 0;
content: 'Next';
}
.viewer-rotate-left::before {
background-position: -140px 0;
content: 'Rotate Left';
}
.viewer-rotate-right::before {
background-position: -160px 0;
content: 'Rotate Right';
}
.viewer-flip-horizontal::before {
background-position: -180px 0;
content: 'Flip Horizontal';
}
.viewer-flip-vertical::before {
background-position: -200px 0;
content: 'Flip Vertical';
}
.viewer-fullscreen::before {
background-position: -220px 0;
content: 'Enter Full Screen';
}
.viewer-fullscreen-exit::before {
background-position: -240px 0;
content: 'Exit Full Screen';
}
.viewer-close::before {
background-position: -260px 0;
content: 'Close';
}
.viewer-container {
bottom: 0;
direction: ltr;
font-size: 0;
left: 0;
line-height: 0;
overflow: hidden;
position: absolute;
right: 0;
-webkit-tap-highlight-color: transparent;
top: 0;
-ms-touch-action: none;
touch-action: none;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.viewer-container::-moz-selection,
.viewer-container *::-moz-selection {
background-color: transparent;
}
.viewer-container::selection,
.viewer-container *::selection {
background-color: transparent;
}
.viewer-container img {
display: block;
height: auto;
max-height: none !important;
max-width: none !important;
min-height: 0 !important;
min-width: 0 !important;
width: 100%;
}
.viewer-canvas {
bottom: 0;
left: 0;
overflow: hidden;
position: absolute;
right: 0;
top: 0;
}
.viewer-canvas > img {
height: auto;
margin: 15px auto;
max-width: 90% !important;
width: auto;
}
.viewer-footer {
bottom: 0;
left: 0;
overflow: hidden;
position: absolute;
right: 0;
text-align: center;
}
.viewer-navbar {
background-color: rgba(0, 0, 0, 0.5);
overflow: hidden;
}
.viewer-list {
-webkit-box-sizing: content-box;
box-sizing: content-box;
height: 50px;
margin: 0;
overflow: hidden;
padding: 1px 0;
}
.viewer-list > li {
color: transparent;
cursor: pointer;
float: left;
font-size: 0;
height: 50px;
line-height: 0;
opacity: 0.5;
overflow: hidden;
-webkit-transition: opacity 0.15s;
transition: opacity 0.15s;
width: 30px;
}
.viewer-list > li:hover {
opacity: 0.75;
}
.viewer-list > li + li {
margin-left: 1px;
}
.viewer-list > .viewer-loading {
position: relative;
}
.viewer-list > .viewer-loading::after {
border-width: 2px;
height: 20px;
margin-left: -10px;
margin-top: -10px;
width: 20px;
}
.viewer-list > .viewer-active,
.viewer-list > .viewer-active:hover {
opacity: 1;
}
.viewer-player {
background-color: #000;
bottom: 0;
cursor: none;
display: none;
left: 0;
position: absolute;
right: 0;
top: 0;
}
.viewer-player > img {
left: 0;
position: absolute;
top: 0;
}
.viewer-toolbar > ul {
display: inline-block;
margin: 0 auto 5px;
overflow: hidden;
padding: 3px 0;
}
.viewer-toolbar > ul > li {
background-color: rgba(0, 0, 0, 0.5);
border-radius: 50%;
cursor: pointer;
float: left;
height: 24px;
overflow: hidden;
-webkit-transition: background-color 0.15s;
transition: background-color 0.15s;
width: 24px;
}
.viewer-toolbar > ul > li:hover {
background-color: rgba(0, 0, 0, 0.8);
}
.viewer-toolbar > ul > li::before {
margin: 2px;
}
.viewer-toolbar > ul > li + li {
margin-left: 1px;
}
.viewer-toolbar > ul > .viewer-small {
height: 18px;
margin-bottom: 3px;
margin-top: 3px;
width: 18px;
}
.viewer-toolbar > ul > .viewer-small::before {
margin: -1px;
}
.viewer-toolbar > ul > .viewer-large {
height: 30px;
margin-bottom: -3px;
margin-top: -3px;
width: 30px;
}
.viewer-toolbar > ul > .viewer-large::before {
margin: 5px;
}
.viewer-tooltip {
background-color: rgba(0, 0, 0, 0.8);
border-radius: 10px;
color: #fff;
display: none;
font-size: 12px;
height: 20px;
left: 50%;
line-height: 20px;
margin-left: -25px;
margin-top: -10px;
position: absolute;
text-align: center;
top: 50%;
width: 50px;
}
.viewer-title {
color: #ccc;
display: inline-block;
font-size: 12px;
line-height: 1;
margin: 0 5% 5px;
max-width: 90%;
opacity: 0.8;
overflow: hidden;
text-overflow: ellipsis;
-webkit-transition: opacity 0.15s;
transition: opacity 0.15s;
white-space: nowrap;
}
.viewer-title:hover {
opacity: 1;
}
.viewer-button {
background-color: rgba(0, 0, 0, 0.5);
border-radius: 50%;
cursor: pointer;
height: 80px;
overflow: hidden;
position: absolute;
right: -40px;
top: -40px;
-webkit-transition: background-color 0.15s;
transition: background-color 0.15s;
width: 80px;
}
.viewer-button:focus,
.viewer-button:hover {
background-color: rgba(0, 0, 0, 0.8);
}
.viewer-button::before {
bottom: 15px;
left: 15px;
position: absolute;
}
.viewer-fixed {
position: fixed;
}
.viewer-open {
overflow: hidden;
}
.viewer-show {
display: block;
}
.viewer-hide {
display: none;
}
.viewer-backdrop {
background-color: rgba(0, 0, 0, 0.5);
}
.viewer-invisible {
visibility: hidden;
}
.viewer-move {
cursor: move;
cursor: -webkit-grab;
cursor: grab;
}
.viewer-fade {
opacity: 0;
}
.viewer-in {
opacity: 1;
}
.viewer-transition {
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
@-webkit-keyframes viewer-spinner {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes viewer-spinner {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
.viewer-loading::after {
-webkit-animation: viewer-spinner 1s linear infinite;
animation: viewer-spinner 1s linear infinite;
border: 4px solid rgba(255, 255, 255, 0.1);
border-left-color: rgba(255, 255, 255, 0.5);
border-radius: 50%;
content: '';
display: inline-block;
height: 40px;
left: 50%;
margin-left: -20px;
margin-top: -20px;
position: absolute;
top: 50%;
width: 40px;
z-index: 1;
}
@media (max-width: 767px) {
.viewer-hide-xs-down {
display: none;
}
}
@media (max-width: 991px) {
.viewer-hide-sm-down {
display: none;
}
}
@media (max-width: 1199px) {
.viewer-hide-md-down {
display: none;
}
}
\ No newline at end of file
MWF.xApplication.AppMarketV2.Application.options.multitask = true;
MWF.require("MWF.widget.MaskNode", null, false);
MWF.xApplication.AppMarketV2.Application.Main = new Class({
Extends: MWF.xApplication.Common.Main,
Implements: [Options, Events],
options: {
"style": "default",
"mvcStyle": "style.css",
"view": "applicationView.html",
"name": "AppMarketV2.Application",
"icon": "icon.png",
"width": "1000",
"height": "700",
"isResize": true,
"isMax": true,
"title": MWF.xApplication.AppMarketV2.Application.LP.title,
"minHeight": 700
},
onQueryLoad: function(){
this.lp = MWF.xApplication.AppMarketV2.Application.LP;
this.actions = MWF.Actions.load("x_program_center");
this.viewPath = this.path+this.options.style+"/"+this.options.view;
this.iconPath = this.path+this.options.style+"/icon/";
this.collectToken = "";
this.collectUrl = "";
if (!this.status) {
} else {
this.options.appid = this.status.appid;
}
this.appdata = {};
},
mask: function(){
if (!this.maskNode){
this.maskNode = new MWF.widget.MaskNode(this.introducenode, {"style": "bam"});
this.maskNode.load();
}
},
unmask: function(){
if (this.maskNode) this.maskNode.hide(function(){
MWF.release(this.maskNode);
this.maskNode = null;
}.bind(this));
},
loadApplication: function(callback){
if (this.collectToken=="" || this.collectUrl==""){
//先登录collcect
this.actions.CollectAction.login(//平台封装好的方法
function( json ){ //服务调用成功的回调函数, json为服务传回的数据
if (json.type && json.type=="success"){
data = json.data; //为变量data赋值
this.collectUrl = data.collectUrl;
this.collectToken = data.collectToken;
this.content.loadHtml(this.viewPath, {"bind": {"lp": this.lp}, "module": this}, function(){
if (!this.options.isRefresh){
this.maxSize(function(){
this.loadIntroduce(callback);
}.bind(this));
}else{
this.loadIntroduce(callback);
}
}.bind(this));
}
}.bind(this),null,false //同步执行
);
}
},
initNodeSize: function(){
this.resizeNodeSize();
this.addEvent("resize", this.resizeNodeSize.bind(this));
},
resizeNodeSize: function(){
var size = this.content.getSize();
var edge = this.introducenode.getEdgeHeight();
var height = size.y - edge;
if (height<this.options.minHeight) height = this.options.minHeight;
this.introducenode.setStyle("height", ""+height+"px");
},
loadIntroduce:function(callback){
debugger;
this.initNodeSize();
if (this.options.appid){
this.actions.MarketAction.get(this.options.appid,function(json){
if (json.data && json.data.icon){
this.appdata = json.data;
var applicationicon = new Element("div",{"class":"o2_appmarket_application_introduce_icon"}).inject(this.applicationintroduceiconcontain);
applicationicon.setStyle("background-image", "url(data:image/png;base64,"+this.appdata.icon+")");
if (this.applicationintroduceiconcontain.clientWidth<300){
applicationicon.setStyle("width",this.applicationintroduceiconcontain.clientWidth);
applicationicon.setStyle("height",450*this.applicationintroduceiconcontain.clientWidth/300);
}
var price=this.appdata.price>0?this.appdata.price+"":"Free";
this.applicationintroducememofree.set("text",price);
this.applicationintroducememoname.set("text",this.appdata.name);
var grade = this.numberFix(this.appdata.grade,1);
this.applicationintroducememoremarkgrade.set("text",grade);
var intgrade = parseInt(grade);
var dotgrade = grade - intgrade;
for (var tmpnum=0;tmpnum<intgrade;tmpnum++){
new Element("img",{"src":this.iconPath+"blackfiveangular.png","class":"o2_appmarket_application_introduce_memo_remark_inner_pic"}).inject(this.applicationintroducememoremarkiconangular)
}
if (dotgrade>=0.5){
new Element("img",{"src":this.iconPath+"halffiveangular.png","class":"o2_appmarket_application_introduce_memo_remark_inner_pic"}).inject(this.applicationintroducememoremarkiconangular);
intgrade++;
}
for (var tmpnum=0;tmpnum<5-intgrade;tmpnum++){
new Element("img",{"src":this.iconPath+"whitefiveangular.png","class":"o2_appmarket_application_introduce_memo_remark_inner_pic"}).inject(this.applicationintroducememoremarkiconangular);
}
if (!this.appdata.commentCount) this.appdata.commentCount=0;
this.applicationintroducememoremarkcommentcount.set("text",""+this.appdata.commentCount+"个评分")
//this.applicationintroducememodownload.set("text",this.appdata.downloadCount);
this.applicationintroducememocategory.set("text","分类:"+this.appdata.category);
this.applicationintroducememocontent.set("html",this.appdata.abort);
this.applicationintroducedownloadprice.set("text","$"+this.appdata.price);
var bottomtext =this.lp.setup;
if (this.appdata.installedVersion && this.appdata.installedVersion!=""){
if (this.appdata.installedVersion==this.appdata.version){
bottomtext = this.lp.setupDone;
}else{
bottomtext = this.lp.update;
}
}
this.applicationintroducedownloadbtntext.set("text",bottomtext);
var _self = this;
this.applicationintroducedownloadbtn.store("data",this.appdata);
this.applicationintroducedownloadbtn.addEvents({
"click": function(e){
//updateorinstall application
var d = this.retrieve("data");
if (d){
_self.installapp(e,d);
}
}
})
//this.applicationintroducefavbtntext.set("text","下载");
this.loadIntroduceInfo();
}
this.fireEvent("load");
}.bind(this));
}
if (callback) callback();
},
tabover: function(e){
e.currentTarget.addClass("o2_appmarket_appcategory_tab_over");
},
tabout: function(e){
e.currentTarget.removeClass("o2_appmarket_appcategory_tab_over");
//e.currentTarget.removeClass("mainColor_border").removeClass("mainColor_color");
},
mouseover:function(){
debugger;
this.addClass("o2_appmarket_appcategory_tab_over");
},
mouseout:function(){
this.removeClass("o2_appmarket_appcategory_tab_over");
},
installapp:function(e,d){
var p = e.target.getPosition();
var tmpe = {"event": {"x": p.x+40, "y": p.y}};
var confirmtitle = d.installedVersion==""?this.lp.confirmsetupTitle:this.lp.confirmupdateTitle;
var confirmcontent = d.installedVersion==""?this.lp.confirmsetupContent:this.lp.confirmupdateContent;
var _self = this;
MWF.xDesktop.confirm("warn", tmpe, confirmtitle, confirmcontent, 300, 120, function(){
_self.mask();
//this.createLoading(this.container,true);
//alert("after createLoading")
_self.actions.MarketAction.installOrUpdate(
d.id,
function( json ){
data = json.data;
_self.notice(d.name+" "+_self.lp.setupSuccess, "success");
_self.unmask();
//this.clearLoading()
}.bind(_self),
function( json ){
data = json.data;
debugger;
_self.unmask();
//this.clearLoading()
}.bind(_self),
true
);
this.close();
}, function(){
this.close();
}, null, null, "o2");
},
loadIntroduceInfo: function(callback){
debugger;
var _self = this;
this.applicationintroducesinfoTab.getParent().getElements(".o2_appmarket_application_introduce_tab_current").removeClass("mainColor_color").removeClass("o2_appmarket_application_introduce_tab_current").addClass("o2_appmarket_application_introduce_tab");
this.applicationintroducesinfoTab.removeClass("o2_appmarket_application_introduce_tab").addClass("mainColor_color").addClass("o2_appmarket_application_introduce_tab_current");
this.applicationintroducecontent.set("html","");
this.applicationintroducecontent.set("html",this.appdata.abort);
this.applicationintroducepicslable.set("html","");
this.applicationintroducepics.set("html","")
this.applicationintroducepicslable.set("html","屏幕截图"); //截图
this.appdata.attList.each(function(peratt,i){
if (peratt.type == "image"){
picdiv = new Element("img",{"class":"o2_appmarket_application_introduce_pic"}).inject(this.applicationintroducepics);
picdiv.setProperty("src", "data:image/png;base64,"+peratt.icon);
picdiv.setProperty("data-original",this.collectUrl +'/o2_collect_assemble/jaxrs/attachment/download/'+peratt.id+"?c-token="+this.collectToken);
picdiv.setProperty("alt",peratt.name);
//picdiv.store("id",peratt.id);
/*
picdiv.addEvents({
"click": function(e){
//updateorinstall application
var d = this.retrieve("id");
if (d){
_self.openLargeImage(e,d);
}
}
})
*/
}
}.bind(this));
this.loadImgView();
},
loadImgView:function(){
if(this.viewer) this.viewer.destroy();
this.applicationintroducepics.setProperty("id","list");
o2.loadCss(this.path+this.options.style+"/viewer.css", this.content,function(){
o2.load(this.path+this.options.style+"/viewer.js", function(){
this.viewer = new Viewer(document.getElementById('list'), {
url: 'data-original'
});
}.bind(this));
}.bind(this));
},
loadIntroduceDemand:function(callback){
debugger;
this.applicationintroducedemandTab.getParent().getElements(".o2_appmarket_application_introduce_tab_current").removeClass("mainColor_color").removeClass("o2_appmarket_application_introduce_tab_current").addClass("o2_appmarket_application_introduce_tab");
this.applicationintroducedemandTab.removeClass("o2_appmarket_application_introduce_tab").addClass("mainColor_color").addClass("o2_appmarket_application_introduce_tab_current");
this.applicationintroducecontent.set("html","");
this.applicationintroducepicslable.set("html","");
this.applicationintroducepics.set("html","")
this.applicationintroducecontent.set("html",this.appdata.installSteps);
},
loadIntroduceComment:function(callback){
debugger;
this.applicationintroducecommentTab.getParent().getElements(".o2_appmarket_application_introduce_tab_current").removeClass("mainColor_color").removeClass("o2_appmarket_application_introduce_tab_current").addClass("o2_appmarket_application_introduce_tab");
this.applicationintroducecommentTab.removeClass("o2_appmarket_application_introduce_tab").addClass("mainColor_color").addClass("o2_appmarket_application_introduce_tab_current");
this.applicationintroducecontent.set("html","");
this.applicationintroducepicslable.set("html","");
this.applicationintroducepics.set("html","");
o2.requireApp("AppMarketV2.Application", "Comment", function(){
new MWF.xApplication.AppMarketV2.Application.Comment(this, this.applicationintroducecontent, {
"onLoad": function(){if (callback) callback();}
});
}.bind(this));
},
/*
openLargeImage:function(e,id){
//alert(this.collectUrl)
if (this.collectUrl=="" || this.collectToken==""){
this.actions.CollectAction.login(//平台封装好的方法
function( json ){ //服务调用成功的回调函数, json为服务传回的数据
if (json.type && json.type=="success"){
data = json.data; //为变量data赋值
this.collectUrl = data.collectUrl;
this.collectToken = data.collectToken;
//download large image by attimageid
this.openLargeImageDl(id);
}
}.bind(this),null,false //同步执行
)
}else{
this.openLargeImageDl(id);
}
},
openLargeImageDl:function(id){
var downloadurl = this.collectUrl +'/o2_collect_assemble/jaxrs/attachment/download/'+id+"?c-token="+this.collectToken;
var content = new Element("div", {"styles": {"overflow": "auto"}});
var largepicdiv = new Element("div", {"styles": {"overflow": "hidden"}}).inject(content);
new Element("img",{"src":downloadurl}).inject(largepicdiv);
o2.DL.open({
"title": "",
"content": content,
"width": 1200,
"height": 800,
"buttonList": [
]
});
},
*/
recordStatus: function(){
debugger;
return {"appid": this.options.appid};x
},
numberFix:function(data,n){
var numbers = '';
// 保留几位小数后面添加几个0
for (var i = 0; i < n; i++) {
numbers += '0';
}
var s = 1 + numbers;
// 如果是整数需要添加后面的0
var spot = "." + numbers;
// Math.round四舍五入
// parseFloat() 函数可解析一个字符串,并返回一个浮点数。
var value = Math.round(parseFloat(data) * s) / s;
// 从小数点后面进行分割
var d = value.toString().split(".");
if (d.length == 1) {
value = value.toString();
return value;
}
if (d.length > 1) {
if (d[1].length < n) {
value = value.toString() + "0";
}
return value;
}
}
});
MWF.xApplication.AppMarketV2.Application.LP = {
"title": "应用市场V2",
"implodeLocal": "从本地导入",
"download": "免费下载",
"setup": "安装",
"setupDone":"已安装",
"update":"更新",
"ok": "确定",
"cancel": "取消",
"setupSuccess": "应用安装成功!",
"localApp": "本地应用",
"appInfoTab":"功能介绍",
"appDemandTab":"安装及使用",
"appCommentTab":"评分及评论",
"commentTitle":"评分及评论",
"commentsuccess":"评论成功",
"confirmsetupTitle":"安装提示",
"confirmsetupContent":"您确认安装本应用么?",
"confirmupdateTitle":"更新提示",
"confirmupdateContent":"您确认更新本应用么?如果安装应用后改过本应用,本次更新后会被替换"
};
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册