ecos之widget
weekbuy:
widget.php
<?php
$setting['author']='zhang';
$setting['name']='周末购';
$setting['version']='v1.0';
$setting['stime']='2014-07-28';
$setting['order']='1';
$setting['catalog']='v1.2场馆挂件';
$setting['description']='本商品在前台周末显示的商品';
$setting['usual']='1';
$setting['template']=array('default.html'=>'默认');
?>
---------
theme_widget_weekbuy.php
<?php
function theme_widget_weekbuy(&$setting,&$render){
return $myData;
}
?>
----------
default.html
<div>
<div>
<img src="<{$setting.first_big_img}>" width='<{$setting.first_big_img_width}>'
height='<{$setting.first_big_img_height}>'>
<ul>
<li><span>五</span><em>FRIDAY</em></li>
<li><span>六</span>
<em>SATURDAY</em>
</li>
<li>
<span>日</span><em>SUNDAY</em>
</li>
</ul>
</div>
<div>
<div>
<a href="<{$setting.url[0]}>"><img src="<{$setting.goods_img[0][0]}>" width="<{$setting.img_width}>"
height="<{$setting.img_height}>"></a>
<a href="<{$setting.url[1]}>"><img src="<{$setting.goods_img[0][1]}>" width="<{$setting.img_width}>"
height="<{$setting.img_height}>"></a>
</div>
<div>
<a href="<{$setting.url[2]}>"><img src="<{$setting.goods_img[0][0]}>" width="<{$setting.img_width}>"
height="<{$setting.img_height}>"></a>
<a href="<{$setting.url[3]}>"><img src="<{$setting.goods_img[0][1]}>" width="<{$setting.img_width}>"
height="<{$setting.img_height}>"></a>
</div>
<div>
<a href="<{$setting.url[4]}>"><img src="<{$setting.goods_img[0][0]}>" width="<{$setting.img_width}>"
height="<{$setting.img_height}>"></a>
<a href="<{$setting.url[5]}>"><img src="<{$setting.goods_img[0][1]}>" width="<{$setting.img_width}>"
height="<{$setting.img_height}>"></a>
</div>
</div>
</div>
<script type="text/javascript">
(function($){
$(function(){
new JqTab('j-tab01',{tabbtn:'tn1',tabitem:'t1-cont-item'});
})
});
</script>
-----------------------
_config.html
<div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="">
第一个大图:
<label>
<input name="first_big_img" value="<{$setting.first_big_img}>">
<input type="button" value="<{t app='b2c'}>上传图片<{/t}>">
</label>
</td>
<td>
宽度:<input value="<{$setting.first_big_img_width|default:202}>">
</td>
<td>
高度:<input value="<{$setting.first_big_img_height|default:290}>">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
宽度:<input name="img_width" value="<{$setting.img_width|default:499}>">
高度:<input name="img_height" value="<{$setting.img_height|default:290}>">
</td>
</tr>
<tr>
</tr>
</table>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
var tag_type="label";
$$("#goods_exshow_config.uploadbtn").addEvent('click',function(e){bindevent(this)});
function bingevent(e1){
var target=$(e1).getParent(tag_type).getElement('.imgsrc');
var url='index.php?app=desktop&act=alertpages&goto'+encondeURIComponent("index.php?app=image
&ctl=admin_manage&act=imgae_broswer&type=big
");
return new imgDialog(url,{onCallback:function(image_id,image_src){
target.value=image_src;
}});
}
</script>>
ecos之widget的更多相关文章
- StructureMap 代码分析之Widget 之Registry 分析 (1)
说句实话,本人基本上没用过Structuremap,但是这次居然开始看源码了,不得不为自己点个赞.Structuremap有很多的类,其中有一个叫做Widget的概念.那么什么是Widget呢?要明白 ...
- Sencha ExtJS 6 Widget Grid 入门
最近由于业务需要,研究了一下Sencha ExtJS 6 ,虽然UI和性能上据相关资料说都有提升,但是用起来确实不太顺手,而且用Sencha cmd工具进行测试和发布,很多内部细节都是隐藏的,出了问题 ...
- 使用 CoordinatorLayout 出错 inflating class android.support.design.widget.CoordinatorLayout
ava.lang.RuntimeException: Unable to start activity ComponentInfo{com.czr.ianpu/com.czr.ianpu.MainAc ...
- yii2——自定义widget
参考资料:http://www.bsourcecode.com/yiiframework2/how-to-create-custom-widget-in-yii2-0-framework/ 如何使 ...
- Yii2 时间控件之把layDate做成widget
实现效果如下 1.把layDate封装成Yii2的widget,存在 "\common\widgets"目录下,命名为DycLayDate,具体引用查看代码. 2.对应的model ...
- 解决Android中No resource found that matches android:TextAppearance.Material.Widget.Button.Inverse问题
解决Android中No resource found that matches android:TextAppearance.Material.Widget.Button.Inverse问题http ...
- Ext.js细节:在MVC中处理Widget Column,GetCmp和ComponentQuery, Id和ItemId
针对EXT.JS版本的演进,要不断的学习新的最佳实践方法. 比如,在定义组件时,尽管用itemid,而不是id. 在搜索组件时,尽量用ComponentQuery,而不是getCmp. 在MVC中处理 ...
- App Widget简单应用
首先后台进程创建一个PendingIntent对象,其中PendingIntent中包含一个真正的Intent,创建完成后将此PendingIntent对象交给桌面控件所在的进程,当用户点击桌面控件或 ...
- App Widget
AppWidgetProviderInfo对象: 为App Widget提供元数据(描述数据的数据,如XML.关系型数据的表结构),包括布 局,更新频率等数据.这个对象被定义在XML文件当中: App ...
随机推荐
- HBase MultiVersionConsistencyControl
注明:本文部分文字和图片翻译或引用自http://blogs.apache.org/hbase/entry/apache_hbase_internals_locking_and. HBase在保证高性 ...
- Bit,Bytes,KB,MB,GB,TB,PB,EB,ZB,YB
Bit,Bytes,KB,MB,GB,TB,PB,EB,ZB,YB 汉字字符 2字节英文字符 1字节中文标点 2字节英文标点 1字节一个字节就是一个八位二进制数啊,2就是00000010,4就是000 ...
- HDOJ(HDU) 1718 Rank(水题、、、)
Problem Description Jackson wants to know his rank in the class. The professor has posted a list of ...
- Foundation Data Structure
LinkedList : /** * 考虑的比较的周全,并且包含了全部的情况,代码也不乱<b></b> * * @param index * 插入的位置 * @param c ...
- git bash中避免在push时反复输入用户名和密码
我用的是windows系统,这几天学着使用git时发现每次使用git push时每次都要输入一遍用户名和密码,感觉特烦,特意上网查了下,找到了简化方法.虽然不是原创,但至少算是加了点自己的心得和经验吧 ...
- 总结Python的思维导图
Python基础的思维导图:
- [LeetCode]Container With Most Water, 解题报告
前言 难怪LeetCode OJ在找工作时被很多人推荐,发现了这道最大蓄水题目就是美团的笔试最后一道题,当时我霸笔只有着一道题目没有答出来,因此也就没有获得面试机会,可惜了 题目 Given n no ...
- eclipse中新建maven项目
maven是个项目管理工具,集各种功能于一身,下面介绍maven web项目在eclipse种的配置,并于tomcat集成.配置成功后,可以跟一般的web项目一样调试. 一.准备条件 1.安装下载jd ...
- UVa 340 Master-Mind Hints (优化查找&复制数组)
340 - Master-Mind Hints Time limit: 3.000 seconds http://uva.onlinejudge.org/index.php?option=com_on ...
- wpf异常:指定的 Visual 不是此 Visual 的上级问题处理解析
WPF在画线的时候,调用Control0.TransformToAncestor(Control1).Transform(new System.Windows.Point(0, 0))方法转换坐标的时 ...