|
@@ -370,7 +370,10 @@ Hotpoint.prototype.addmedia = function(){
|
|
|
if (type === 'photo' || type === 'video') {
|
|
|
if (!$dom) return $seft.val('');
|
|
|
var $addLayout = $(document.createElement('a'));
|
|
|
+ var $addInput = $('<input type="file">')
|
|
|
var $close = $(document.createElement('span'));
|
|
|
+ $addInput[0].files = this.files ;
|
|
|
+ $addLayout.append($addInput)
|
|
|
$addLayout.append($close);
|
|
|
$addLayout.append($dom);
|
|
|
$addLayout.addClass("result");
|
|
@@ -423,12 +426,12 @@ Hotpoint.prototype.remHot = function (that,thisScene) {
|
|
|
thisScene.scene.remove(g_HotMeshes[i]);
|
|
|
g_HotMeshes[i].visible = false;
|
|
|
//如果热点数据中有这个热点数据就删除
|
|
|
- g_HotMeshes.splice(i, 1);
|
|
|
- console.log("删除成功:" + hotId);
|
|
|
+ //g_HotMeshes.splice(i, 1);
|
|
|
}
|
|
|
}
|
|
|
that.closest("li").remove();
|
|
|
this.spotList.find(".hotNum").text(this.spotList.find("ul li").length);
|
|
|
+ console.log("删除成功:" + hotId);
|
|
|
}
|
|
|
//添加热点模型
|
|
|
Hotpoint.prototype.addHot = function (that, Hot, fn) {
|
|
@@ -491,7 +494,7 @@ Hotpoint.prototype.inputList = function (text,val) {
|
|
|
if(arguments[1]){
|
|
|
_val = 'value='+val;
|
|
|
}
|
|
|
- return '<div class="link"> <input class="text" type="text" placeholder='+text+' maxlength="40" spellcheck="false" '+_val+' > </div>'
|
|
|
+ return '<div class="link"> <input class="text" type="text" placeholder='+text+' spellcheck="false" '+_val+' > </div>'
|
|
|
}
|
|
|
//添加热点模型
|
|
|
Hotpoint.prototype.addModel = function () {
|
|
@@ -628,7 +631,21 @@ Hotpoint.prototype.saveHot = function () {
|
|
|
}
|
|
|
return success(++rcount);
|
|
|
} else {
|
|
|
- dFile = $file[0].localName === "input" ? $file[0] : $file[0].localName === "span" ? $file.find('input')[0] : $file.closest("li").find('.upload input')[0];
|
|
|
+ switch ($file[0].localName) {
|
|
|
+ case "input":
|
|
|
+ dFile = $file[0]
|
|
|
+ break;
|
|
|
+ case "span":
|
|
|
+ dFile = $file.find('input')[0];
|
|
|
+ break;
|
|
|
+ case "a":
|
|
|
+ dFile = $file.find('input')[0];
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ dFile = $file.closest("li").find('.upload input')[0];
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ // dFile = $file[0].localName === "input" ? $file[0] : $file[0].localName === "span" ? $file.find('input')[0] : $file.closest("li").find('.upload input')[0];
|
|
|
}
|
|
|
|
|
|
var file = (dFile.files && dFile.files[0]) || '';
|