Merge pull request 'dev' (#117) from dev into master

Reviewed-on: #117
This commit is contained in:
mkm 2024-01-17 11:14:34 +08:00
commit 59f81f74a5
25 changed files with 115 additions and 241 deletions

View File

@ -107,14 +107,14 @@ class StoreOrderCreateRepository extends StoreOrderRepository
}
if ($address) {
if ($cart['source'] == 0) {
$userAddressCode = ($address['province_code'] ?? '') . ',' . ($address['city_code'] ?? '') . ',' . ($address['district_code'] ?? '') . ',' . ($address['street_code'] ?? '') . ',' . ($address['village_code'] ?? '') . ',' . ($address['brigade_id'] ?? 0);
$getUrl = env('LOGISTICS_HOST_URL') . '/api/hasCourier?user_address_code=' . $userAddressCode;
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', $getUrl);
$courierData = json_decode($response->getBody(), true);
if (empty($courierData['code']) || $courierData['code'] != 1) {
throw new ValidateException('该收货区域未设置快递员');
}
// $userAddressCode = ($address['province_code'] ?? '') . ',' . ($address['city_code'] ?? '') . ',' . ($address['district_code'] ?? '') . ',' . ($address['street_code'] ?? '') . ',' . ($address['village_code'] ?? '') . ',' . ($address['brigade_id'] ?? 0);
// $getUrl = env('LOGISTICS_HOST_URL') . '/api/hasCourier?user_address_code=' . $userAddressCode;
// $client = new \GuzzleHttp\Client();
// $response = $client->request('GET', $getUrl);
// $courierData = json_decode($response->getBody(), true);
// if (empty($courierData['code']) || $courierData['code'] != 1) {
// throw new ValidateException('该收货区域未设置快递员');
// }
}
}
}
@ -479,165 +479,32 @@ class StoreOrderCreateRepository extends StoreOrderRepository
}
}
unset($merchantCart);
$usePlatformCouponId = 0;
$total_platform_coupon_price = 0;
//计算平台券优惠金额
// if ($total_true_price > 0) {
$StoreCouponUser = app()->make(StoreCouponUserRepository::class);
$platformCoupon = $StoreCouponUser->validUserPlatformCoupon($uid);
if ($enabledPlatformCoupon && count($platformCoupon)) {
$catePriceLst = [];
$storePriceLst = [];
$_cartNum = 0;
foreach ($merchantCartList as &$merchantCart) {
if ($merchantCart['order']['true_price'] <= 0) continue;
foreach ($merchantCart['list'] as &$cart) {
$_cartNum++;
if ($cart['product']['cate_id']) {
if (!isset($catePriceLst[$cart['product']['cate_id']])) {
$catePriceLst[$cart['product']['cate_id']] = ['price' => 0, 'cart' => []];
}
$catePriceLst[$cart['product']['cate_id']]['price'] = bcadd($catePriceLst[$cart['product']['cate_id']]['price'], $cart['true_price']);
$catePriceLst[$cart['product']['cate_id']]['cart'][] = &$cart;
}
}
unset($cart);
$storePriceLst[$merchantCart['mer_id']] = [
'price' => $merchantCart['order']['true_price'],
'num' => count($merchantCart['list'])
];
}
unset($merchantCart);
$flag = false;
$platformCouponRate = null;
foreach ($platformCoupon as &$coupon) {
$coupon['checked'] = false;
//通用券
if ($coupon['coupon']['type'] === StoreCouponRepository::TYPE_PLATFORM_ALL) {
$coupon['disabled'] = $total_true_price <= 0 || $coupon['use_min_price'] > $total_true_price;
if (!$platformCouponRate && !$coupon['disabled'] && !$flag && ((!$usePlatformCouponId && !$usePlatformCouponFlag) || $usePlatformCouponId == $coupon['coupon_user_id'])) {
$platformCouponRate = [
'id' => $coupon['coupon_user_id'],
'type' => $coupon['coupon']['type'],
'price' => $total_true_price,
'coupon_price' => $coupon['coupon_price'],
'use_count' => $_cartNum,
'check' => function ($cart) {
return true;
}
];
$coupon['checked'] = true;
$flag = true;
}
//品类券
} else if ($coupon['coupon']['type'] === StoreCouponRepository::TYPE_PLATFORM_CATE) {
$_price = 0;
$_use_count = 0;
$cateIds = $coupon['product']->column('product_id');
$allCateIds = array_unique(array_merge(app()->make(StoreCategoryRepository::class)->allChildren($cateIds), $cateIds));
$flag2 = true;
foreach ($allCateIds as $cateId) {
if (isset($catePriceLst[$cateId])) {
$_price = bcadd($catePriceLst[$cateId]['price'], $_price, 2);
$_use_count += count($catePriceLst[$cateId]['cart']);
$flag2 = false;
}
}
$coupon['disabled'] = $flag2 || $coupon['use_min_price'] > $_price;
//品类券可用
if (!$platformCouponRate && !$coupon['disabled'] && !$flag && !$flag2 && ((!$usePlatformCouponId && !$usePlatformCouponFlag) || $usePlatformCouponId == $coupon['coupon_user_id'])) {
$platformCouponRate = [
'id' => $coupon['coupon_user_id'],
'type' => $coupon['coupon']['type'],
'price' => $_price,
'use_cate' => $allCateIds,
'coupon_price' => $coupon['coupon_price'],
'use_count' => $_use_count,
'check' => function ($cart) use ($allCateIds) {
return in_array($cart['product']['cate_id'], $allCateIds);
}
];
$coupon['checked'] = true;
$flag = true;
}
//跨店券
} else if ($coupon['coupon']['type'] === StoreCouponRepository::TYPE_PLATFORM_STORE) {
$_price = 0;
$_use_count = 0;
$flag2 = true;
foreach ($coupon['product'] as $item) {
$merId = $item['product_id'];
if (isset($storePriceLst[$merId])) {
$_price = bcadd($storePriceLst[$merId]['price'], $_price, 2);
$_use_count += $storePriceLst[$merId]['num'];
$flag2 = false;
}
}
$coupon['disabled'] = $flag2 || $coupon['use_min_price'] > $_price;
//店铺券可用
if (!$platformCouponRate && !$coupon['disabled'] && !$flag && !$flag2 && ((!$usePlatformCouponId && !$usePlatformCouponFlag) || $usePlatformCouponId == $coupon['coupon_user_id'])) {
$_merIds = $coupon['product']->column('product_id');
$platformCouponRate = [
'id' => $coupon['coupon_user_id'],
'type' => $coupon['coupon']['type'],
'price' => $_price,
'use_store' => $_merIds,
'coupon_price' => $coupon['coupon_price'],
'use_count' => $_use_count,
'check' => function ($cart) use ($_merIds) {
return in_array($cart['mer_id'], $_merIds);
}
];
$coupon['checked'] = true;
$flag = true;
}
}
}
unset($coupon);
}
$platformConsumption=[];
$consumption=[];
//消费金
// if ($source == 103) {
// $ConsumptionWhere = [
// 'uid' => $uid,
// 'start_time' => date('Y-m-d H:i:s'),
// 'status' => 0,
// 'is_fail' => 0
// ];
// $platformConsumption = Db::name('store_consumption_user')->where($ConsumptionWhere)->limit(100)->order('create_time', 'desc')
// ->filed('uid,coupon_title,coupon_price')
// ->select();
// if($platformConsumption){
// $consumption=$platformConsumption[0];
// }
// }
// }
$usePlatformCouponId = 0;
$total_platform_coupon_price = 0;
//计算平台优惠券
if (isset($platformCouponRate)) {
$_coupon_price = $platformCouponRate['coupon_price'];
foreach ($merchantCartList as &$merchantCart) {
$_ids = array_column($merchantCart['list'], 'cart_id');
usort($merchantCart['list'], function ($a, $b) {
return $a['true_price'] > $b['true_price'] ? 1 : -1;
});
$_price = 0;
foreach ($merchantCart['list'] as &$cart) {
if ($cart['true_price'] <= 0 || !$platformCouponRate['check']($cart)) continue;
if ($platformCouponRate['use_count'] === 1) {
$couponPrice = min($platformCouponRate['coupon_price'], $cart['true_price']);
} else {
$couponPrice = min(max(0.01, bcmul($_coupon_price, bcdiv($cart['true_price'], $platformCouponRate['price'], 6), 2)), $cart['true_price']);
}
$platformCouponRate['coupon_price'] = bcsub($platformCouponRate['coupon_price'], $couponPrice, 2);
$cart['true_price'] = bcsub($cart['true_price'], $couponPrice, 2);
$cart['platform_coupon_price'] = $couponPrice;
$platformCouponRate['use_count']--;
$_price = bcadd($couponPrice, $_price, 2);
}
unset($cart);
$merchantCart['order']['platform_coupon_price'] = $_price;
$merchantCart['order']['true_price'] = bcsub($merchantCart['order']['true_price'], $_price, 2);
$total_platform_coupon_price = bcadd($total_platform_coupon_price, $_price, 2);
usort($merchantCart['list'], function ($a, $b) use ($_ids) {
return array_search($a['cart_id'], $_ids) > array_search($b['cart_id'], $_ids) ? 1 : -1;
});
}
$usePlatformCouponId = $platformCouponRate['id'];
unset($merchantCart);
}
//积分配置
$sysIntegralConfig = systemConfig(['integral_money', 'integral_status', 'integral_order_rate']);
$merIntegralFlag = false;
@ -691,6 +558,10 @@ class StoreOrderCreateRepository extends StoreOrderRepository
$pay_price = $org_price;
}
if($consumption){
$pay_price = bcsub($pay_price, $consumption['coupon_price'], 2);
}
$giveIntegralFlag = $sysIntegralConfig['integral_status'] && $sysIntegralConfig['integral_order_rate'] > 0;
$total_give_integral = 0;

View File

@ -639,6 +639,13 @@ class ProductRepository extends BaseRepository
$ot_price = !$ot_price ? $ot_price_ : (($ot_price > $ot_price_) ? $ot_price : $ot_price_);
$unique = $this->setUnique($productId, $sku, $productType);
$single_number=$value['single_number']??0;
$single_procure_price=0;
$single_price=0;
if(isset($value['single_number']) && $value['single_number']>1){
$single_procure_price= bcdiv($procure_price,$value['single_number'],2);
$single_price= bcdiv($price,$value['single_number'],2);
}
$result['attrValue'][] = [
'detail' => json_encode($value['detail'] ?? ''),
"bar_code" => $value["bar_code"] ?? '',
@ -658,7 +665,10 @@ class ProductRepository extends BaseRepository
'sales' => $isUpdate ? ($oldSku[$sku]['sales'] ?? 0) : 0,
'svip_price' => $_svip_price,
'mer_id' => $merId,
'procure_price' => $procure_price
'procure_price' => $procure_price,
'single_number'=>$single_number,
'single_procure_price'=>$single_procure_price,
'single_price'=>$single_price
];
$stock = $stock + intval($value['stock']);
}

View File

@ -673,6 +673,7 @@ class UserRepository extends BaseRepository
];
if($code){
$data['promotion_code']=$code;
Cache::delete('promote_'.$ip);
}
return $this->create($user_type, $data);
}

View File

@ -3,8 +3,7 @@
.tabbody .panel { position: absolute;width:100%; height:100%;background: #fff; display: none;}
.tabbody .focus { display: block;}
body{font-size: 12px;color: #888;}
/*overflow: hidden;}*/
body{font-size: 12px;color: #888;overflow: hidden;}
input,label{vertical-align:middle}
.clear{clear: both;}
.pl{padding-left: 18px;padding-left: 23px\9;}
@ -92,4 +91,4 @@ div.alignment,#custom{margin-left: 23px;margin-left: 28px\9;}
height: 107px;
border: 3px solid #1094fa;
background-position: 72px 72px;
}
}

View File

@ -1,11 +1,16 @@
html, body {
body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow-x: hidden;
}
html{
width: 100%;
margin: 0;
padding: 0;
overflow-x: hidden;
}
.main {
width: 100%;
overflow: hidden;
@ -162,4 +167,4 @@ html, body {
height: 100px;
line-height: 100px;
text-align: center;
}
}

View File

@ -83,4 +83,4 @@
<!-- video -->
<script type="text/javascript" src="video.js"></script>
</body>
</html>
</html>

View File

@ -19,7 +19,7 @@
<body>
<div>
<h1>完整demo</h1>
<script id="editor" type="text/plain" style="width:1024px;height:500px;">${store.summary}</script>
<script id="editor" type="text/plain" style="width:1024px;height:500px;">{$food[content]}</script>
</div>
<div id="btns">
<div>

View File

@ -61,7 +61,7 @@ div.edui-box {
}
.edui-default .edui-popup {
position: relative;
position: absolute;
-webkit-user-select: none;
-moz-user-select: none;
}
@ -270,7 +270,7 @@ div.edui-box {
position: absolute;
bottom: -25px;
left: 0;
z-index: 2009;
z-index: 1009;
width: 99.9%;
}
@ -1060,7 +1060,6 @@ div.edui-box {
background-clip: padding-box;
padding: 5px;
background:#ffffff;
width: 200px;
}
.edui-default .edui-popup .edui-bordereraser {

File diff suppressed because one or more lines are too long

View File

@ -1,22 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,viewport-fit=cover"/>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
<!-- <link rel="stylesheet" type="text/css" href="引入h5页面基础样式"> -->
<style>
img {
-ms-interpolation-mode: bicubic;
}
img {
width: 100%;
}
</style>
</head>
<body>
<div id="phone_preview_div"></div>
</body>
</html>

View File

@ -2435,7 +2435,7 @@ typeof(exports) != 'undefined' ? exports.SyntaxHighlighter = SyntaxHighlighter :
// http://davidchambersdesign.com/
var keywords = 'after before beginning continue copy each end every from return get global in local named of set some that the then times to where whose with without';
var ordinals = 'first second third fourth fifth sixth seventh eighth ninth tenth last front back middle';
var specials = 'activate add alias AppleScript ask attachment boolean class constant delete duplicate empty exists false id integer list make message modal modified new no paragraph pi properties quit real reconciliation remove rest result reveal reverse run running save string true word yes';
var specials = 'activate add alias AppleScript ask attachment boolean class constant delete duplicate empty exists false id integer list make message modal modified new no paragraph pi properties quit real record remove rest result reveal reverse run running save string true word yes';
this.regexList = [
@ -2830,7 +2830,7 @@ typeof(exports) != 'undefined' ? exports.SyntaxHighlighter = SyntaxHighlighter :
'of on or packed pansichar pansistring pchar pcurrency pdatetime pextended ' +
'pint64 pointer private procedure program property pshortstring pstring ' +
'pvariant pwidechar pwidestring protected public published raise real real48 ' +
'reconciliation repeat set shl shortint shortstring shr single smallint string then ' +
'record repeat set shl shortint shortstring shr single smallint string then ' +
'threadvar to true try type unit until uses val var varirnt while widechar ' +
'widestring with word write writeln xor';

View File

@ -151,7 +151,7 @@ win.HighchartsAdapter = {
// run
effect.start(params);
// reconciliation for use in stop method
// record for use in stop method
el.fx = effect;
},

View File

@ -807,7 +807,7 @@ function getTimeTicks(normalizedInterval, min, max, startOfWeek) {
}
// reconciliation information on the chosen unit - for dynamic label formatter
// record information on the chosen unit - for dynamic label formatter
tickPositions.info = extend(normalizedInterval, {
higherRanks: higherRanks,
totalRange: interval * count
@ -2647,7 +2647,7 @@ SVGElement.prototype = {
});
}
// reconciliation correction
// record correction
wrapper.xCorr = xCorr;
wrapper.yCorr = yCorr;
}
@ -2663,7 +2663,7 @@ SVGElement.prototype = {
height = elem.offsetHeight; // assigned to height for JSLint purpose
}
// reconciliation current text transform
// record current text transform
wrapper.cTT = currentTextTransform;
}
},
@ -4331,7 +4331,7 @@ SVGRenderer.prototype = {
});
}
// reconciliation current values
// record current values
text.x = x;
text.y = y;
}
@ -5062,7 +5062,7 @@ Highcharts.VMLElement = VMLElement = {
element.parentNode.insertBefore(shadow, element);
}
// reconciliation it
// record it
shadows.push(shadow);
}
@ -7750,7 +7750,7 @@ Axis.prototype = {
// get fixed positions based on tickInterval
axis.setTickPositions();
// reconciliation old values to decide whether a rescale is necessary later on (#540)
// record old values to decide whether a rescale is necessary later on (#540)
axis.oldUserMin = axis.userMin;
axis.oldUserMax = axis.userMax;
@ -9549,7 +9549,7 @@ Pointer.prototype = {
// a selection has been made
if (this.hasDragged || hasPinched) {
// reconciliation each axis' min and max
// record each axis' min and max
each(chart.axes, function (axis) {
if (axis.zoomEnabled) {
var horiz = axis.horiz,
@ -12479,7 +12479,7 @@ Point.prototype = {
}
}
// reconciliation changes in the parallel arrays
// record changes in the parallel arrays
i = inArray(point, data);
series.xData[i] = point.x;
series.yData[i] = series.toYData ? series.toYData(point) : point.y;
@ -15499,7 +15499,7 @@ var SplineSeries = extendClass(Series, {
leftContY = 2 * plotY - rightContY;
}
// reconciliation for drawing in next point
// record for drawing in next point
point.rightContX = rightContX;
point.rightContY = rightContY;
@ -15744,7 +15744,7 @@ var ColumnSeries = extendClass(Series, {
Series.prototype.translate.apply(series);
// reconciliation the new values
// record the new values
each(series.points, function (point) {
var yBottom = pick(point.yBottom, translatedThreshold),
plotY = mathMin(mathMax(-999 - yBottom, point.plotY), yAxis.len + 999 + yBottom), // Don't draw too far outside plot area (#1303, #2241)

View File

@ -290,7 +290,7 @@
// Create new columns with the length of either end-start or rowCount
columns[i - startColumn] = [];
// Setting the length to avoid jslint warning
// SettingMer the length to avoid jslint warning
columns[i - startColumn].length = Math.min(rowCount, endRow - startRow);
}
}

View File

@ -4429,7 +4429,7 @@ jQuery.extend({
type: {
set: function( elem, value ) {
if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
// Setting the type on a radio button after the value resets the value in IE6-9
// SettingMer the type on a radio button after the value resets the value in IE6-9
// Reset value to default in case type is set after value during creation
var val = elem.value;
elem.setAttribute( "type", value );
@ -4597,7 +4597,7 @@ if ( !getSetAttribute ) {
};
// Set contenteditable to false on removals(#10429)
// Setting to empty string throws an error as an invalid value
// SettingMer to empty string throws an error as an invalid value
jQuery.attrHooks.contenteditable = {
set: function( elem, value, name ) {
nodeHook.set( elem, value === "" ? false : value, name );
@ -7356,7 +7356,7 @@ if ( !jQuery.support.opacity ) {
jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
style.removeAttribute ) {
// Setting style.filter to null, "" & " " still leave "filter:" in the cssText
// SettingMer style.filter to null, "" & " " still leave "filter:" in the cssText
// if "filter:" is present at all, clearType is disabled, we want to avoid this
// style.removeAttribute is IE Only, but so apparently is this code path...
style.removeAttribute( "filter" );

File diff suppressed because one or more lines are too long

View File

@ -372,7 +372,7 @@ vjs.cleanUpEvents = function(elem, type) {
if (data.handlers[type].length === 0) {
delete data.handlers[type];
// data.handlers[type] = null;
// Setting to null was causing an error with data.handlers
// SettingMer to null was causing an error with data.handlers
// Remove the meta-handler from the element
if (document.removeEventListener) {
@ -3923,7 +3923,7 @@ vjs.Player.prototype.listenForUserActivity = function(){
// we consider them active even if they're not moving their finger or mouse.
// So we want to continue to update that they are active
clearInterval(mouseInProgress);
// Setting userActivity=true now and setting the interval to the same time
// SettingMer userActivity=true now and setting the interval to the same time
// as the activityCheck interval (250) should ensure we never miss the
// next activityCheck
mouseInProgress = setInterval(vjs.bind(this, onMouseActivity), 250);
@ -4415,6 +4415,7 @@ vjs.SeekBar.prototype.onMouseMove = function(event){
vjs.SeekBar.prototype.onMouseUp = function(event){
vjs.Slider.prototype.onMouseUp.call(this, event);
this.player_.scrubbing = false;
if (this.videoWasPlaying) {
this.player_.play();
@ -5531,7 +5532,7 @@ vjs.Flash = vjs.MediaTechController.extend({
// Not sure why that's a security issue, but apparently it is.
iDoc.write(vjs.Flash.getEmbedCode(options['swf'], flashVars, params, attributes));
// Setting variables on the window needs to come after the doc write because otherwise they can get reset in some browsers
// SettingMer variables on the window needs to come after the doc write because otherwise they can get reset in some browsers
// So far no issues with swf ready event being called before it's set on the window.
iWin['player'] = this.player_;

View File

@ -179,7 +179,6 @@ var browser = UE.browser = function(){
*/
browser.ie7Compat = ( ( version == 7 && !document.documentMode )
|| document.documentMode == 7 );
/**
* @property { boolean } ie6Compat 检测浏览器模式是否为 IE6 模式 或者怪异模式
* @warning 如果浏览器不是IE 则该值为undefined
@ -12673,7 +12672,7 @@ UE.plugins['paragraph'] = function() {
} );
}
tmpRange.setEndAfter( tmpNode );
para = range.document.createElement( style );
if(attrs){
domUtils.setAttributes(para,attrs);
@ -12685,7 +12684,7 @@ UE.plugins['paragraph'] = function() {
//需要内容占位
if(domUtils.isEmptyNode(para)){
domUtils.fillChar(range.document,para);
}
tmpRange.insertNode( para );
@ -12809,7 +12808,7 @@ UE.plugins['paragraph'] = function() {
},
doDirectionality = function(range,editor,forward){
var bookmark,
filterFn = function( node ) {
return node.nodeType == 1 ? !domUtils.isBookmarkNode(node) : !domUtils.isWhitespace(node);
@ -20027,6 +20026,14 @@ UE.plugins['table'] = function () {
var caption = domUtils.findParentByTagName(me.selection.getStart(), 'caption', true),
range = me.selection.getRange();
var child = range.startContainer;
if (child != null) {
if (child.tagName == "VIDEO") {
domUtils.remove(child);
}
}
if (range.collapsed && caption && isEmptyBlock(caption)) {
me.fireEvent('saveScene');
var table = caption.parentNode;
@ -22731,7 +22738,7 @@ UE.plugins['formatmatch'] = function(){
});
function addList(type,evt){
if(browser.webkit){
var target = evt.target.tagName == 'IMG' ? evt.target : null;
}
@ -22797,7 +22804,7 @@ UE.plugins['formatmatch'] = function(){
me.commands['formatmatch'] = {
execCommand : function( cmdName ) {
if(flag){
flag = 0;
list = [];
@ -22806,7 +22813,7 @@ UE.plugins['formatmatch'] = function(){
}
var range = me.selection.getRange();
img = range.getClosedNode();
if(!img || img.tagName != 'IMG'){
@ -25245,7 +25252,7 @@ UE.ui = baidu.editor.ui = {};
domUtils = baidu.editor.dom.domUtils,
UIBase = baidu.editor.ui.UIBase,
uiUtils = baidu.editor.ui.uiUtils;
var Mask = baidu.editor.ui.Mask = function (options){
this.initOptions(options);
this.initUIBase();
@ -25541,7 +25548,7 @@ UE.ui = baidu.editor.ui = {};
}
};
utils.inherits(Popup, UIBase);
domUtils.on( document, 'mousedown', function ( evt ) {
var el = evt.target || evt.srcElement;
closeAllPopup( evt,el );
@ -25637,7 +25644,7 @@ UE.ui = baidu.editor.ui = {};
var utils = baidu.editor.utils,
uiUtils = baidu.editor.ui.uiUtils,
UIBase = baidu.editor.ui.UIBase;
var TablePicker = baidu.editor.ui.TablePicker = function (options){
this.initOptions(options);
this.initTablePicker();
@ -25721,7 +25728,7 @@ UE.ui = baidu.editor.ui = {};
var browser = baidu.editor.browser,
domUtils = baidu.editor.dom.domUtils,
uiUtils = baidu.editor.ui.uiUtils;
var TPL_STATEFUL = 'onmousedown="$$.Stateful_onMouseDown(event, this);"' +
' onmouseup="$$.Stateful_onMouseUp(event, this);"' +
( browser.ie ? (
@ -25730,7 +25737,7 @@ UE.ui = baidu.editor.ui = {};
: (
' onmouseover="$$.Stateful_onMouseOver(event, this);"' +
' onmouseout="$$.Stateful_onMouseOut(event, this);"' ));
baidu.editor.ui.Stateful = {
alwalysHoverable: false,
target:null,//目标元素和this指向dom不一样
@ -27355,7 +27362,7 @@ UE.ui = baidu.editor.ui = {};
setValue : function(value){
this._value = value;
}
};
utils.inherits(MenuButton, SplitButton);
})();
@ -28985,7 +28992,7 @@ UE.ui = baidu.editor.ui = {};
// }
// });
for(var key in UE._customizeUI){
var obj = UE._customizeUI[key]
var itemUI,index;

File diff suppressed because one or more lines are too long

View File

@ -34,17 +34,17 @@
// 工具栏上的所有的功能按钮和下拉框可以在new编辑器的实例时选择自己需要的重新定义
toolbars: [[
'previewmobile', 'source', '|', 'undo', 'redo', '|',
'source', '|', 'undo', 'redo', '|',
'bold', 'italic', 'underline', 'strikethrough', '|', 'superscript', 'subscript', '|', 'forecolor', 'backcolor', '|',
'removeformat', '|', 'insertorderedlist', 'insertunorderedlist', '|', 'selectall', 'cleardoc', 'paragraph', '|',
'fontfamily', 'fontsize', '|', 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|',
'|', 'horizontal', 'print', 'drafts', 'formula'
'horizontal', 'print', 'drafts', 'formula',
// 'preview',
]],
// 当鼠标放在工具栏上时显示的tooltip提示,留空支持自动多语言配置,否则以配置值为准
labelMap:{
'previewmobile':'手机预览'
},
//, labelMap:{
// 'anchor':'', 'undo':''
// }
// 语言配置项,默认是zh-cn。有需要的话也可以使用如下这样的方式来自动多语言切换当然前提条件是lang文件夹下存在对应的语言文件
// lang值也可以通过自动获取 (navigator.language||navigator.browserLanguage ||navigator.userLanguage).toLowerCase()
@ -56,7 +56,7 @@
//, theme:'default'
//, themePath:URL +"themes/"
//, zIndex : 900 //编辑器层级的基数,默认是900
zIndex : 2008, //编辑器层级的基数,默认是900
// 针对getAllHtml方法会在对应的head标签中增加该编码设置。
//, charset:"utf-8"
@ -418,7 +418,10 @@
tt: [],
u: [],
ul: ['class', 'style'],
video: ['autoplay', 'controls', 'loop', 'preload', 'src', 'height', 'width', 'class', 'style']
video: ['autoplay', 'controls', 'loop', 'preload', 'src', 'height', 'width', 'class', 'style'],
source: ['src', 'type'],
embed: ['type', 'class', 'pluginspage', 'src', 'width', 'height', 'align', 'style', 'wmode', 'play', 'autoplay','loop', 'menu', 'allowscriptaccess', 'allowfullscreen', 'controls', 'preload'],
iframe: ['src', 'class', 'height', 'width', 'max-width', 'max-height', 'align', 'frameborder', 'allowfullscreen']
}
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long