KMS代码提交
BIN
com.actionsoft.apps.kms/icon16.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
BIN
com.actionsoft.apps.kms/icon64.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
com.actionsoft.apps.kms/icon96.png
Normal file
|
After Width: | Height: | Size: 76 KiB |
84
com.actionsoft.apps.kms/manifest.xml
Normal file
@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<app xmlns="http://www.actionsoft.com.cn/app">
|
||||
<name>KMS知识管理</name>
|
||||
<version>1.6</version>
|
||||
<buildNo>46</buildNo>
|
||||
<developer id="776cca9a287c8b4d63b9cad216aa3859" tablePrefix="ACT" url="http://www.actionsoft.com.cn">北京炎黄盈动科技发展有限责任公司</developer>
|
||||
<categoryVisible>true</categoryVisible>
|
||||
<description><![CDATA[场景化的专业知识管理门户]]></description>
|
||||
<details><![CDATA[企业级知识管理系统,帮助企业系统有效的组织、获取、存储和共享知识。<br>
|
||||
<b>主要特点</b><br>
|
||||
- 穿透文档内容,一站式知识门户
|
||||
- 共享知识并与内容交互
|
||||
- 提取并管理元数据以方便查找
|
||||
- 场景化交互的知识地图
|
||||
- 对知识内容的生命周期管理
|
||||
- 多渠道集成知识内容
|
||||
- 适用于企业的安全控制
|
||||
|
||||
<b>功能依赖</b><br>
|
||||
-在线预览文件依赖 [文档预览服务] (图片等浏览器支持的格式除外)
|
||||
-全文检索功能依赖 [全文检索引擎]
|
||||
-阅读邀请功能依赖 [通知中心] 和 [工作网络]
|
||||
-收藏功能依赖 [我的收藏]]]></details>
|
||||
<installListener>com.actionsoft.apps.kms.AfterInstallationEvent</installListener>
|
||||
<pluginListener>com.actionsoft.apps.kms.Plugins</pluginListener>
|
||||
<startListener/>
|
||||
<stopListener/>
|
||||
<upgradeListener/>
|
||||
<uninstallListener/>
|
||||
<reloadable>true</reloadable>
|
||||
<requires>
|
||||
<require appId="com.actionsoft.apps.addons.es" notActiveHandler="error" res="false"/>
|
||||
<require appId="com.actionsoft.apps.favorite" notActiveHandler="error" res="false"/>
|
||||
<require appId="com.actionsoft.apps.notification" notActiveHandler="error" res="false"/>
|
||||
<require appId="com.actionsoft.apps.network" notActiveHandler="error" res="false"/>
|
||||
<require appId="com.actionsoft.apps.addons.xpages" notActiveHandler="none" res="false"/>
|
||||
<require appId="com.actionsoft.apps.points" notActiveHandler="none" res="false"/>
|
||||
<require appId="com.awspaas.user.apps.yili.integration" notActiveHandler="none" res="false"/>
|
||||
<require appId="com.actionsoft.apps.dict" notActiveHandler="none" res="false"/>
|
||||
<require appId="com.actionsoft.apps.addons.onlinedoc" notActiveHandler="none" res="false"/>
|
||||
</requires>
|
||||
<allowStartup>true</allowStartup>
|
||||
<allowUpgradeByStore>true</allowUpgradeByStore>
|
||||
<depend versions="6.5" env="6.3.3">com.actionsoft.apps.coe.pal</depend>
|
||||
<installDate>2024-10-18 17:38:36</installDate>
|
||||
<productId>00000000000000000000000000000000</productId>
|
||||
<icon code="&#xe85d;" color="#009688"/>
|
||||
<properties>
|
||||
<property action="disabled" group="参数" name="systemParam" title="知识参数" type="textarea" isSystem="false" desc="browserPreview:浏览器直接预览类型,maxFileSize:最大文档,单位(M),如超过该限制将不提供转换服务,blackFileList:不允许上传的文件类型,gridRowPP:列表每页显示条数" ref="">{"browserPreview":"bmp,ico","maxFileSize":"100","blackFileList":"exe@`@bat@`@sh","gridRowPP":"25"}</property>
|
||||
<property action="edit" group="文件分类配置" name="picture" title="图片格式" type="input" isSystem="false" desc="文件分类-图片">png,gif,jpg,jpeg,psd,bmp,pcx,pic</property>
|
||||
<property action="edit" group="文件分类配置" name="doc" title="文档格式" type="input" isSystem="false" desc="文件分类-文档">doc,docx,ppt,pptx,xls,xlsx,txt,pdf,wps,wpt,dps,dpt,pps,et,ett,csv,md</property>
|
||||
<property action="edit" group="文件分类配置" name="video" title="视频格式" type="input" isSystem="false" desc="文件分类-视频">avi,mpg,wmv,3gp,mkv,asf,swf,mov,xv,rmvb,rm,mp4,flv</property>
|
||||
<property action="edit" group="文件分类配置" name="audio" title="音频格式" type="input" isSystem="false" desc="文件分类-音频">mp3,ape,wma,wav,mpeg</property>
|
||||
<property action="edit" group="参数" name="dimensionPermRule" title="维度权限规则" type="combox" isSystem="false" desc="修改后需要重启应用" ref="不配置权限无权限:0|不配置权限有权限:1">0</property>
|
||||
<property action="edit" group="参数" name="knwlsearchpage" title="知识门户页面" type="combox" isSystem="false" desc="知识门户链接后打开的页面。知识列表是原来一直有的页面,知识TOP排行是为一个客户特别做的,为了升级方便用参数控制" ref="知识列表:1|知识相关TOP排行:2">1</property>
|
||||
<property action="edit" group="参数" name="extendsLinks" title="扩展附加的频道" type="textarea" isSystem="false" desc="JSON数组 每一个频道是一个JSON 包括属性 title(链接名称)url(链接地址)<br>知识排行页面附加的功能" ref="">[{title:'CNKI',url:'http://www.baidu.com'}]</property>
|
||||
<property action="edit" group="参数" name="hasOnlineLevel" title="是否开启格式转换" type="combox" isSystem="false" desc="知识编辑详情页面格式转换选项,选择否隐藏,值默认是转PDF,允许下载<br>选择是则显示选项" ref="是:1|否:0">0</property>
|
||||
<property action="edit" group="参数" name="ACPUBLISH" title="发布权限策略" type="combox" isSystem="false" desc="维度配置为需要审批,如果AC授权不配置,会触发审批流程;如果AC配置了发布权限,则被授权人不触发审批流程直接发布。<br>此参数需要结合【维度权限规则】参数中选择【不配置权限有权限】时使用。权限针对普通用户生效。" ref="不配置没有发布权限:0|需要审批维度,不配置需要审批,配置无需审批直接发布;不需审批维度,不配置没有发布权限:1">0</property>
|
||||
<property action="edit" group="积分规则" name="pointOfOpenCard" title="打开知识卡片获得积分" type="input" isSystem="false" desc="首次打开知识卡片时,操作者可获得相应分值。如果0表示不开启该积分项" ref="">0</property>
|
||||
<property action="edit" group="积分规则" name="pointOfViewFile" title="在线阅读文件内容获得积分" type="input" isSystem="false" desc="首次在线阅读文件内容时(转换成功的有效内容),操作者可获得相应分值。如果0表示不开启该积分项" ref="">1</property>
|
||||
<property action="edit" group="积分规则" name="pointOfDownFile" title="下载文件获得积分" type="input" isSystem="false" desc="首次下载文件时,操作者可获得相应分值。如果0表示不开启该积分项" ref="">1</property>
|
||||
<property action="edit" group="积分规则" name="pointOfPublish" title="发布知识卡片获得积分" type="input" isSystem="false" desc="发布知识卡片到一个或多个维度通过后,操作者可获得相应分值。如果0表示不开启该积分项" ref="">8</property>
|
||||
<property action="edit" group="参数" name="KMS_KEY" title="KEY" type="input" isSystem="false" desc="" ref="">{"key":"你的暗号口令","ip":"调用方IP地址"}</property>
|
||||
</properties>
|
||||
<suspend>false</suspend>
|
||||
<modelAdministrator/>
|
||||
<deployment>
|
||||
<system id="obj_5d377d80a096415cb9f4b8b08ec718ab" icon16="../apps/com.actionsoft.apps.kms/img/icon20.png" icon64="../apps/com.actionsoft.apps.kms/img/icon64.png" icon96="../apps/com.actionsoft.apps.kms/img/icon96.png" notifier="" name="%u77E5%u8BC6" target="mainFrame" url="/" deployUrlType="2" source="0" appId="com.actionsoft.apps.kms">
|
||||
<directory id="obj_074a0aa665cf48c0a0f1ce1d7536c276" icon16="../apps/com.actionsoft.apps.kms/img/icon20.png" icon64="../apps/com.actionsoft.apps.kms/img/icon64.png" icon96="../apps/com.actionsoft.apps.kms/img/icon96.png" notifier="" name="%u77E5%u8BC6%u5E93" target="mainFrame" url="/" deployUrlType="2" source="0" orderIndex="3" appId="com.actionsoft.apps.kms">
|
||||
<function id="obj_9db6edd0ccf5433f82fe0af6fd67b7cc" icon16="&#xe856;|#3383da" icon64="../apps/com.actionsoft.apps.kms/img/function_icon/knwlPortal/icon64.png" icon96="../apps/com.actionsoft.apps.kms/img/function_icon/knwlPortal/icon96.png" notifier="" name="%u77E5%u8BC6%u95E8%u6237" target="mainFrame" url="./w?sid=@sid&cmd=com.actionsoft.apps.kms_knwl&page=search" deployUrlType="2" source="0" orderIndex="1" appId="com.actionsoft.apps.kms"/>
|
||||
<function id="obj_21d0b756a48946ccb5d38668f32943b2" icon16="&#xe862;|#ff9421" icon64="../apps/com.actionsoft.apps.kms/img/function_icon/knwlCenter/icon64.png" icon96="../apps/com.actionsoft.apps.kms/img/function_icon/knwlCenter/icon96.png" notifier="" name="%u77E5%u8BC6%u4E2D%u5FC3" target="mainFrame" url="./w?sid=@sid&cmd=com.actionsoft.apps.kms_knwl&page=center" deployUrlType="2" source="0" orderIndex="2" appId="com.actionsoft.apps.kms"/>
|
||||
</directory>
|
||||
<directory id="obj_baa3cbfe5b4f4154bde3b2ce2a73e7d5" icon16="../commons/img/setting_20.png" icon64="../apps/com.actionsoft.apps.kms/img/icon64.png" icon96="../apps/com.actionsoft.apps.kms/img/icon96.png" notifier="" name="%u77E5%u8BC6%u7BA1%u7406" target="mainFrame" url="/" deployUrlType="2" source="0" orderIndex="4" appId="com.actionsoft.apps.kms">
|
||||
<function id="obj_4f48f895966349beb2bd3e01bda46b69" icon16="&#xe863;|#3383da" icon64="../apps/com.actionsoft.apps.kms/img/function_icon/dimensionMgr/icon64.png" icon96="../apps/com.actionsoft.apps.kms/img/function_icon/dimensionMgr/icon96.png" notifier="" name="%u7EF4%u5EA6%u7BA1%u7406" target="mainFrame" url="./w?sid=@sid&cmd=com.actionsoft.apps.kms_mgr&page=knwl&tab=dimension" deployUrlType="2" source="0" orderIndex="1" appId="com.actionsoft.apps.kms"/>
|
||||
<function id="obj_9acae9a8b50142daac7d98efda6d13d6" icon16="&#xe612;|#3383da" icon64="../apps/com.actionsoft.apps.kms/img/function_icon/metaMgr/icon64.png" icon96="../apps/com.actionsoft.apps.kms/img/function_icon/metaMgr/icon96.png" notifier="" name="%u5143%u6570%u636E%u7BA1%u7406" target="mainFrame" url="./w?sid=@sid&cmd=com.actionsoft.apps.kms_mgr&page=knwl&tab=metaSchema" deployUrlType="2" source="0" orderIndex="2" appId="com.actionsoft.apps.kms"/>
|
||||
<function id="obj_28b304cc5bad4636adfa780f45317033" icon16="&#xe854;|#ff9421" icon64="../apps/com.actionsoft.apps.kms/img/function_icon/validdateMgr/icon64.png" icon96="../apps/com.actionsoft.apps.kms/img/function_icon/validdateMgr/icon96.png" notifier="" name="%u6709%u6548%u671F%u7BA1%u7406" target="mainFrame" url="./w?sid=@sid&cmd=com.actionsoft.apps.kms_mgr&page=knwl&tab=periofvali" deployUrlType="2" source="0" orderIndex="3" appId="com.actionsoft.apps.kms"/>
|
||||
<function id="obj_50e47d2f2cac4738b4b819bf68dc1f81" icon16="&#xe861;|#3383da" icon64="../apps/com.actionsoft.apps.kms/img/function_icon/systemMgr/icon64.png" icon96="../apps/com.actionsoft.apps.kms/img/function_icon/systemMgr/icon96.png" notifier="" name="%u7CFB%u7EDF%u7BA1%u7406" target="mainFrame" url="./w?sid=@sid&cmd=com.actionsoft.apps.kms_mgr&page=system" deployUrlType="2" source="0" orderIndex="4" appId="com.actionsoft.apps.kms"/>
|
||||
</directory>
|
||||
</system>
|
||||
</deployment>
|
||||
<releaseDate>2024-10-18</releaseDate>
|
||||
<upgradeDate>2022-08-24 11:00:18</upgradeDate>
|
||||
</app>
|
||||
525
com.actionsoft.apps.kms/web/com.actionsoft.apps.kms/action.xml
Normal file
@ -0,0 +1,525 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<aws-actions>
|
||||
|
||||
<!-- 知识中心 -->
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl">
|
||||
<param name="page"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center">
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_me_card_list_json">
|
||||
<param name="curPage"/>
|
||||
<param name="rowsPerPage"/>
|
||||
<param name="sortIndx"/>
|
||||
<param name="sortDir"/>
|
||||
<param name="filter"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_publish_card_list_json">
|
||||
<param name="curPage"/>
|
||||
<param name="rowsPerPage"/>
|
||||
<param name="sortIndx"/>
|
||||
<param name="sortDir"/>
|
||||
<param name="filter"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_log_list">
|
||||
<param name="curPage"/>
|
||||
<param name="rowsPerPage"/>
|
||||
<param name="cardId"/>
|
||||
<param name="sortIndx"/>
|
||||
<param name="sortDir"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_borrow_card_list_json">
|
||||
<param name="curPage"/>
|
||||
<param name="rowsPerPage"/>
|
||||
<param name="sortIndx"/>
|
||||
<param name="sortDir"/>
|
||||
<param name="filter"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_publish_examine_card_list_json">
|
||||
<param name="curPage"/>
|
||||
<param name="rowsPerPage"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_dimension_tree_json">
|
||||
<param name="parentId"/>
|
||||
<param name="isDimensionKnwlPage"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_dimension_card_list_json">
|
||||
<param name="dimensionId"/>
|
||||
<param name="curPage"/>
|
||||
<param name="rowsPerPage"/>
|
||||
<param name="sortIndx"/>
|
||||
<param name="sortDir"/>
|
||||
<param name="filter"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_delete_file">
|
||||
<param name="cardId"/>
|
||||
<param name="fileId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_me_publish_dimension_tree_json">
|
||||
<param name="parentId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_schema_attr_list_json">
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_publish_card">
|
||||
<param name="publishCardIds"/>
|
||||
<param name="publishDimensionIds"/>
|
||||
<param name="schemaMetaData"/>
|
||||
<param name="tags"/>
|
||||
<param name="publishMemo"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_rate_card">
|
||||
<param name="rateId"/>
|
||||
<param name="cardId"/>
|
||||
<param name="rateLevel"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_browse_card_info_json">
|
||||
<param name="cardId"/>
|
||||
<param name="isBorrow"/>
|
||||
<param name="boId"/>
|
||||
<param name="isEdit"/>
|
||||
<param name="dimensionId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_browse_card_page">
|
||||
<param name="cardId"/>
|
||||
<param name="isPage"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_send_browse_invitation">
|
||||
<param name="cardId"/>
|
||||
<param name="targetUsers"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_comment_insert">
|
||||
<param name="cardId"/>
|
||||
<param name="commentContent"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_stat_json">
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_borrow_card_process_start">
|
||||
<param name="cardId"/>
|
||||
<param name="dimensionId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_publish_card_process_start">
|
||||
<param name="cardIds"/>
|
||||
<param name="dimensionId"/>
|
||||
<param name="schemaMetaData"/>
|
||||
<param name="tags"/>
|
||||
<param name="publishMemo"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_cancel_publish_card">
|
||||
<param name="publishId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_hotspot_home">
|
||||
<param name="dimensionId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_get_dimension_path_from_root">
|
||||
<param name="dimensionId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_package_files">
|
||||
<param name="cardId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_collect_card">
|
||||
<param name="cardId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_delete_unsaved_files">
|
||||
<param name="cardId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_report_card">
|
||||
<param name="cardId"/>
|
||||
<param name="dimensionId"/>
|
||||
<param name="reportContent"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_preview_file">
|
||||
<param name="fileId"/>
|
||||
<param name="isDownload"/>
|
||||
<param name="isCopy"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_download_file">
|
||||
<param name="fileId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_latest_comment">
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_get_network_page">
|
||||
<param name="cardId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_get_network_tree">
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_all_move_dimension_tree_json">
|
||||
<param name="parentId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_move_card">
|
||||
<param name="cardIds"/>
|
||||
<param name="dimensionIds"/>
|
||||
<param name="currDimensionId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_copy_card">
|
||||
<param name="cardIds"/>
|
||||
<param name="dimensionIds"/>
|
||||
<param name="currDimensionId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_change_carduser">
|
||||
<param name="cardIds"/>
|
||||
<param name="handoverCardUser"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_check_card_has_file">
|
||||
<param name="cardIds"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_cancel_publish_card_process_start">
|
||||
<param name="publishId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_browser_preview">
|
||||
<param name="fileId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_browser_preview_image">
|
||||
<param name="fileId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_browser_preview_form">
|
||||
<param name="fileId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_dimension_grid_html">
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_dimension_grid_page_iframe">
|
||||
<param name="dimensionId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_dimension_grid_page">
|
||||
<param name="dimensionId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_dimension_card_list_all_json">
|
||||
<param name="dimensionId"/>
|
||||
</cmd-bean>
|
||||
<!-- 知识检索 -->
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_search">
|
||||
<param name="searchType"/>
|
||||
<param name="sortIndx"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_search_attr_dimension_tree_json">
|
||||
<param name="parentId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_search_attr_dimension_tree_all_json">
|
||||
</cmd-bean>
|
||||
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_search_schema_attr_list_json">
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_attr_search_dosearch">
|
||||
<param name="curPage"/>
|
||||
<param name="rowsPerPage"/>
|
||||
<param name="sortIndx"/>
|
||||
<param name="sortDir"/>
|
||||
<param name="searchDimensionIds"/>
|
||||
<param name="schemaMetaData"/>
|
||||
<param name="cardName"/>
|
||||
<param name="publishTime"/>
|
||||
<param name="publishUser"/>
|
||||
<param name="tags"/>
|
||||
<param name="lastPublishId"/>
|
||||
<param name="searchType"/>
|
||||
<param name="departId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_fullsearch_list_json">
|
||||
<param name="curPage"/>
|
||||
<param name="rowsPerPage"/>
|
||||
<param name="searchText"/>
|
||||
<param name="docTypes"/>
|
||||
<param name="searchType"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_shareto_network">
|
||||
<param name="cardId"/>
|
||||
<param name="teamId"/>
|
||||
<param name="networkId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_memberlist">
|
||||
<param name="term"/>
|
||||
</cmd-bean>
|
||||
|
||||
<!-- 知识维护 -->
|
||||
<cmd-bean name="com.actionsoft.apps.kms_mgr">
|
||||
<param name="page"/>
|
||||
<param name="tab"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_mgr">
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_dimension_tree_json">
|
||||
<param name="parentId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_dimension_tree_bindhotspot_json">
|
||||
<param name="parentId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_dimension_validdate_tree_json">
|
||||
<param name="parentId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_dimension_validdate_tree_all_json">
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_dimension_list_json">
|
||||
<param name="parentId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_add_dimension">
|
||||
<param name="dimensionNames"/>
|
||||
<param name="parentId"/>
|
||||
<param name="showtype"/>
|
||||
<param name="isPublishKnwl"/>
|
||||
<param name="isExamine"/>
|
||||
<param name="memo"/>
|
||||
<param name="hotspotName"/>
|
||||
<param name="isEnabled"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_update_dimension">
|
||||
<param name="id"/>
|
||||
<param name="dimensionName"/>
|
||||
<param name="showtype"/>
|
||||
<param name="isPublishKnwl"/>
|
||||
<param name="isExamine"/>
|
||||
<param name="memo"/>
|
||||
<param name="hotspotName"/>
|
||||
<param name="isEnabled"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_delete_dimension">
|
||||
<param name="ids"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_mgr_schema_list_json">
|
||||
<param name="curPage"/>
|
||||
<param name="rowsPerPage"/>
|
||||
<param name="sortIndx"/>
|
||||
<param name="sortDir"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_mgr_valid_date_card_list_json">
|
||||
<param name="curPage"/>
|
||||
<param name="rowsPerPage"/>
|
||||
<param name="dimensionIdArr"/>
|
||||
<param name="validDate"/>
|
||||
<param name="sortIndx"/>
|
||||
<param name="sortDir"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_insert_card">
|
||||
<param name="cardId"/>
|
||||
<param name="cardName"/>
|
||||
<param name="validDate"/>
|
||||
<param name="onlineLevel"/>
|
||||
<param name="securityLevel"/>
|
||||
<param name="cardType"/>
|
||||
<param name="isComment"/>
|
||||
<param name="isRate"/>
|
||||
<param name="cardContext"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_update_card">
|
||||
<param name="cardId"/>
|
||||
<param name="cardName"/>
|
||||
<param name="validDate"/>
|
||||
<param name="onlineLevel"/>
|
||||
<param name="securityLevel"/>
|
||||
<param name="cardType"/>
|
||||
<param name="isComment"/>
|
||||
<param name="isRate"/>
|
||||
<param name="cardContext"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_delete_card">
|
||||
<param name="cardIds"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_file_list_json">
|
||||
<param name="cardId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_meta_attr_list_json">
|
||||
<param name="schemaId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_mgr_add_meta_schema">
|
||||
<param name="schemaTitle"/>
|
||||
<param name="schemaShowtype"/>
|
||||
<param name="isNullable"/>
|
||||
<param name="isSearch"/>
|
||||
<param name="schemaDesc"/>
|
||||
<param name="metaAttr"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_mgr_update_meta_schema">
|
||||
<param name="schemaId"/>
|
||||
<param name="schemaTitle"/>
|
||||
<param name="schemaShowtype"/>
|
||||
<param name="isNullable"/>
|
||||
<param name="isSearch"/>
|
||||
<param name="schemaDesc"/>
|
||||
<param name="metaAttr"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_mgr_delete_meta_schema">
|
||||
<param name="schemaIds"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_hotspot_binding">
|
||||
<param name="dimensionId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_hotspot_bind">
|
||||
<param name="dimensionId"/>
|
||||
<param name="shapeId"/>
|
||||
<param name="hotspotDefId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_hotspot_bind_card">
|
||||
<param name="cardId"/>
|
||||
<param name="shapeId"/>
|
||||
<param name="hotspotDefId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_hotspot_delete_bind">
|
||||
<param name="hotspotId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_hotspot_bind_linkurl">
|
||||
<param name="linkurl"/>
|
||||
<param name="target"/>
|
||||
<param name="shapeId"/>
|
||||
<param name="hotspotDefId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_hotspot_render_hotspot_div">
|
||||
<param name="dimensionId"/>
|
||||
<param name="shapeId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_move_dimension">
|
||||
<param name="sourceDimensionId"/>
|
||||
<param name="targetDimensionId"/>
|
||||
<param name="sort"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_delay_validdate">
|
||||
<param name="dimensionIdArr"/>
|
||||
<param name="validDate"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_mgr_meta_schema_order_index_save">
|
||||
<param name="sourceId"/>
|
||||
<param name="targetId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_cancel_publishes_card_check">
|
||||
<param name="cardId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_cancel_publishes_card">
|
||||
<param name="cardId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_mgr_get_examine_user">
|
||||
<param name="dimensionId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_mgr_report">
|
||||
<param name="dimensionId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_mgr_dimension_ac_to_des">
|
||||
<param name="dimensionId"/>
|
||||
<param name="style"/>
|
||||
</cmd-bean>
|
||||
|
||||
<!-- 系统维护 -->
|
||||
<cmd-bean name="com.actionsoft.apps.kms_system_mgr">
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_version_list_json">
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_hotspot_def_list_json">
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_system_mgr_save_param">
|
||||
<param name="maxFileSize"/>
|
||||
<param name="blackFileList"/>
|
||||
<param name="gridRowPP"/>
|
||||
<param name="browserPreview"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_system_mgr_get_param_json">
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_system_mgr_add_version">
|
||||
<param name="versionNo"/>
|
||||
<param name="memo"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_system_mgr_add_hotspot_def">
|
||||
<param name="hotspotName"/>
|
||||
<param name="hotspotMetaId"/>
|
||||
<param name="memo"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_delete_version">
|
||||
<param name="versionNos"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_delete_hotspot_def">
|
||||
<param name="hotspotDefIds"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_delete_hotspot_check">
|
||||
<param name="hotspotDefIds"/>
|
||||
</cmd-bean>
|
||||
<!-- usertask -->
|
||||
<cmd-bean name="com.actionsoft.apps.kms_usertask_html">
|
||||
<param name="formToKMSOptionDimensionIdJA"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_es_search">
|
||||
<param name="q"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_xpages">
|
||||
<param name="showIndex"/>
|
||||
<param name="showStyle"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_mgr_dimension_copy">
|
||||
<param name="newDimensionName"/>
|
||||
<param name="currDimensionId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_querycardtoplist">
|
||||
<param name="sortIndx"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_querycardtoppage">
|
||||
<param name="sortIndx"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_xpage_opencardbydirctory">
|
||||
<param name="sortIndx"/>
|
||||
<param name="rootDirectoryId"/>
|
||||
<param name="showType"/>
|
||||
<param name="showIndex"/>
|
||||
<param name="ifShowDirectory"/>
|
||||
<param name="showStyle"/>
|
||||
<param name="publishTimeFormat"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_xpage_getcardbydirctory">
|
||||
<param name="directoryId"/>
|
||||
<param name="sortIndx"/>
|
||||
<param name="hasPerm"/>
|
||||
<param name="publishTimeFormat"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_xpage_getxpagecategory">
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_xpage_savexpagecategory">
|
||||
<param name="categoryName"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_xpage_openfastcard">
|
||||
<param name="category"/>
|
||||
<param name="showType"/>
|
||||
<param name="showIndex"/>
|
||||
<param name="showStyle"/>
|
||||
<param name="publishTimeFormat"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_xpage_savexpagefastcard">
|
||||
<param name="categoryName"/>
|
||||
<param name="cardIds"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_xpage_loadfastcard">
|
||||
<param name="categoryName"/>
|
||||
<param name="publishTimeFormat"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_xpage_deletexpagefastcard">
|
||||
<param name="id"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_xpage_savefastcardorder">
|
||||
<param name="data"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_xpage_getcardtree">
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_xpage_getcardtreedata">
|
||||
<param name="type"/>
|
||||
<param name="pid"/>
|
||||
<param name="hasPerm"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_knwl_center_change_dimensionuser">
|
||||
<param name="dimensionIds"/>
|
||||
<param name="handoverCardUser"/>
|
||||
</cmd-bean>
|
||||
|
||||
<cmd-bean name="com.actionsoft.apps.kms_mobile">
|
||||
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_mobile_portal">
|
||||
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_mobile_direct">
|
||||
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_mobile_myknwl">
|
||||
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_mobile_file_details">
|
||||
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_mobile_top"></cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_mobile_create"></cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_mobile_meta_page"></cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.kms_mobile_dimension_page"></cmd-bean>
|
||||
|
||||
<cmd-bean name="com.actionsoft.apps.kms_mobile_search"></cmd-bean>
|
||||
</aws-actions>
|
||||
|
After Width: | Height: | Size: 779 B |
|
After Width: | Height: | Size: 795 B |
|
After Width: | Height: | Size: 814 B |
|
After Width: | Height: | Size: 413 B |
|
After Width: | Height: | Size: 424 B |
|
After Width: | Height: | Size: 445 B |
|
After Width: | Height: | Size: 415 B |
|
After Width: | Height: | Size: 174 B |
|
After Width: | Height: | Size: 181 B |
|
After Width: | Height: | Size: 804 B |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 294 B |
|
After Width: | Height: | Size: 326 B |
|
After Width: | Height: | Size: 710 B |
|
After Width: | Height: | Size: 696 B |
|
After Width: | Height: | Size: 918 B |
|
After Width: | Height: | Size: 881 B |
|
After Width: | Height: | Size: 711 B |
|
After Width: | Height: | Size: 693 B |
|
After Width: | Height: | Size: 369 B |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 381 B |
|
After Width: | Height: | Size: 171 B |
|
After Width: | Height: | Size: 166 B |
|
After Width: | Height: | Size: 355 B |
|
After Width: | Height: | Size: 653 B |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 211 B |
|
After Width: | Height: | Size: 238 B |
|
After Width: | Height: | Size: 175 B |
|
After Width: | Height: | Size: 205 B |
|
After Width: | Height: | Size: 661 B |
|
After Width: | Height: | Size: 608 B |
|
After Width: | Height: | Size: 284 B |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 345 B |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 699 B |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 715 B |
|
After Width: | Height: | Size: 667 B |
|
After Width: | Height: | Size: 930 B |
|
After Width: | Height: | Size: 685 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 631 B |
@ -0,0 +1,473 @@
|
||||
/*!
|
||||
* jQuery Raty - A Star Rating Plugin
|
||||
* ------------------------------------------------------------------
|
||||
*
|
||||
* jQuery Raty is a plugin that generates a customizable star rating.
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
*
|
||||
* @version 2.5.2
|
||||
* @since 2010.06.11
|
||||
* @author Washington Botelho
|
||||
* @documentation wbotelhos.com/raty
|
||||
*
|
||||
* ------------------------------------------------------------------
|
||||
*
|
||||
* <div id="star"></div>
|
||||
*
|
||||
* $('#star').raty();
|
||||
*
|
||||
*/
|
||||
|
||||
;(function($) {
|
||||
|
||||
var methods = {
|
||||
init: function(settings) {
|
||||
return this.each(function() {
|
||||
methods.destroy.call(this);
|
||||
|
||||
this.opt = $.extend(true, {}, $.fn.raty.defaults, settings);
|
||||
|
||||
var that = $(this),
|
||||
inits = ['number', 'readOnly', 'score', 'scoreName'];
|
||||
|
||||
methods._callback.call(this, inits);
|
||||
|
||||
if (this.opt.precision) {
|
||||
methods._adjustPrecision.call(this);
|
||||
}
|
||||
|
||||
this.opt.number = methods._between(this.opt.number, 0, this.opt.numberMax)
|
||||
|
||||
this.opt.path = this.opt.path || '';
|
||||
|
||||
if (this.opt.path && this.opt.path.slice(this.opt.path.length - 1, this.opt.path.length) !== '/') {
|
||||
this.opt.path += '/';
|
||||
}
|
||||
|
||||
this.stars = methods._createStars.call(this);
|
||||
this.score = methods._createScore.call(this);
|
||||
|
||||
methods._apply.call(this, this.opt.score);
|
||||
|
||||
var space = this.opt.space ? 4 : 0,
|
||||
width = this.opt.width || (this.opt.number * this.opt.size + this.opt.number * space);
|
||||
|
||||
if (this.opt.cancel) {
|
||||
this.cancel = methods._createCancel.call(this);
|
||||
|
||||
width += (this.opt.size + space);
|
||||
}
|
||||
|
||||
if (this.opt.readOnly) {
|
||||
methods._lock.call(this);
|
||||
} else {
|
||||
that.css('cursor', 'pointer');
|
||||
methods._binds.call(this);
|
||||
}
|
||||
|
||||
if (this.opt.width !== false) {
|
||||
that.css('width', width);
|
||||
}
|
||||
|
||||
methods._target.call(this, this.opt.score);
|
||||
|
||||
that.data({ 'settings': this.opt, 'raty': true });
|
||||
});
|
||||
}, _adjustPrecision: function() {
|
||||
this.opt.targetType = 'score';
|
||||
this.opt.half = true;
|
||||
}, _apply: function(score) {
|
||||
if (score && score > 0) {
|
||||
score = methods._between(score, 0, this.opt.number);
|
||||
this.score.val(score);
|
||||
}
|
||||
|
||||
methods._fill.call(this, score);
|
||||
|
||||
if (score) {
|
||||
methods._roundStars.call(this, score);
|
||||
}
|
||||
}, _between: function(value, min, max) {
|
||||
return Math.min(Math.max(parseFloat(value), min), max);
|
||||
}, _binds: function() {
|
||||
if (this.cancel) {
|
||||
methods._bindCancel.call(this);
|
||||
}
|
||||
|
||||
methods._bindClick.call(this);
|
||||
methods._bindOut.call(this);
|
||||
methods._bindOver.call(this);
|
||||
}, _bindCancel: function() {
|
||||
methods._bindClickCancel.call(this);
|
||||
methods._bindOutCancel.call(this);
|
||||
methods._bindOverCancel.call(this);
|
||||
}, _bindClick: function() {
|
||||
var self = this,
|
||||
that = $(self);
|
||||
|
||||
self.stars.on('click.raty', function(evt) {
|
||||
self.score.val((self.opt.half || self.opt.precision) ? that.data('score') : this.alt);
|
||||
|
||||
if (self.opt.click) {
|
||||
self.opt.click.call(self, parseFloat(self.score.val()), evt);
|
||||
}
|
||||
});
|
||||
}, _bindClickCancel: function() {
|
||||
var self = this;
|
||||
|
||||
self.cancel.on('click.raty', function(evt) {
|
||||
self.score.removeAttr('value');
|
||||
|
||||
if (self.opt.click) {
|
||||
self.opt.click.call(self, null, evt);
|
||||
}
|
||||
});
|
||||
}, _bindOut: function() {
|
||||
var self = this;
|
||||
|
||||
$(this).on('mouseleave.raty', function(evt) {
|
||||
var score = parseFloat(self.score.val()) || undefined;
|
||||
|
||||
methods._apply.call(self, score);
|
||||
methods._target.call(self, score, evt);
|
||||
|
||||
if (self.opt.mouseout) {
|
||||
self.opt.mouseout.call(self, score, evt);
|
||||
}
|
||||
});
|
||||
}, _bindOutCancel: function() {
|
||||
var self = this;
|
||||
|
||||
self.cancel.on('mouseleave.raty', function(evt) {
|
||||
$(this).attr('src', self.opt.path + self.opt.cancelOff);
|
||||
|
||||
if (self.opt.mouseout) {
|
||||
self.opt.mouseout.call(self, self.score.val() || null, evt);
|
||||
}
|
||||
});
|
||||
}, _bindOverCancel: function() {
|
||||
var self = this;
|
||||
|
||||
self.cancel.on('mouseover.raty', function(evt) {
|
||||
$(this).attr('src', self.opt.path + self.opt.cancelOn);
|
||||
|
||||
self.stars.attr('src', self.opt.path + self.opt.starOff);
|
||||
|
||||
methods._target.call(self, null, evt);
|
||||
|
||||
if (self.opt.mouseover) {
|
||||
self.opt.mouseover.call(self, null);
|
||||
}
|
||||
});
|
||||
}, _bindOver: function() {
|
||||
var self = this,
|
||||
that = $(self),
|
||||
action = self.opt.half ? 'mousemove.raty' : 'mouseover.raty';
|
||||
|
||||
self.stars.on(action, function(evt) {
|
||||
var score = parseInt(this.alt, 10);
|
||||
|
||||
if (self.opt.half) {
|
||||
var position = parseFloat((evt.pageX - $(this).offset().left) / self.opt.size),
|
||||
plus = (position > .5) ? 1 : .5;
|
||||
|
||||
score = score - 1 + plus;
|
||||
|
||||
methods._fill.call(self, score);
|
||||
|
||||
if (self.opt.precision) {
|
||||
score = score - plus + position;
|
||||
}
|
||||
|
||||
methods._roundStars.call(self, score);
|
||||
|
||||
that.data('score', score);
|
||||
} else {
|
||||
methods._fill.call(self, score);
|
||||
}
|
||||
|
||||
methods._target.call(self, score, evt);
|
||||
|
||||
if (self.opt.mouseover) {
|
||||
self.opt.mouseover.call(self, score, evt);
|
||||
}
|
||||
});
|
||||
}, _callback: function(options) {
|
||||
for (i in options) {
|
||||
if (typeof this.opt[options[i]] === 'function') {
|
||||
this.opt[options[i]] = this.opt[options[i]].call(this);
|
||||
}
|
||||
}
|
||||
}, _createCancel: function() {
|
||||
var that = $(this),
|
||||
icon = this.opt.path + this.opt.cancelOff,
|
||||
cancel = $('<img />', { src: icon, alt: 'x', title: this.opt.cancelHint, 'class': 'raty-cancel' });
|
||||
|
||||
if (this.opt.cancelPlace == 'left') {
|
||||
that.prepend(' ').prepend(cancel);
|
||||
} else {
|
||||
that.append(' ').append(cancel);
|
||||
}
|
||||
|
||||
return cancel;
|
||||
}, _createScore: function() {
|
||||
return $('<input />', { type: 'hidden', name: this.opt.scoreName }).appendTo(this);
|
||||
}, _createStars: function() {
|
||||
var that = $(this);
|
||||
|
||||
for (var i = 1; i <= this.opt.number; i++) {
|
||||
var title = methods._getHint.call(this, i),
|
||||
icon = (this.opt.score && this.opt.score >= i) ? 'starOn' : 'starOff';
|
||||
|
||||
icon = this.opt.path + this.opt[icon];
|
||||
|
||||
$('<img />', { src : icon, alt: i, title: title }).appendTo(this);
|
||||
|
||||
if (this.opt.space) {
|
||||
that.append((i < this.opt.number) ? ' ' : '');
|
||||
}
|
||||
}
|
||||
|
||||
return that.children('img');
|
||||
}, _error: function(message) {
|
||||
$(this).html(message);
|
||||
|
||||
$.error(message);
|
||||
}, _fill: function(score) {
|
||||
var self = this,
|
||||
hash = 0;
|
||||
|
||||
for (var i = 1; i <= self.stars.length; i++) {
|
||||
var star = self.stars.eq(i - 1),
|
||||
select = self.opt.single ? (i == score) : (i <= score);
|
||||
|
||||
if (self.opt.iconRange && self.opt.iconRange.length > hash) {
|
||||
var irange = self.opt.iconRange[hash],
|
||||
on = irange.on || self.opt.starOn,
|
||||
off = irange.off || self.opt.starOff,
|
||||
icon = select ? on : off;
|
||||
|
||||
if (i <= irange.range) {
|
||||
star.attr('src', self.opt.path + icon);
|
||||
}
|
||||
|
||||
if (i == irange.range) {
|
||||
hash++;
|
||||
}
|
||||
} else {
|
||||
var icon = select ? 'starOn' : 'starOff';
|
||||
|
||||
star.attr('src', this.opt.path + this.opt[icon]);
|
||||
}
|
||||
}
|
||||
}, _getHint: function(score) {
|
||||
var hint = this.opt.hints[score - 1];
|
||||
return (hint === '') ? '' : (hint || score);
|
||||
}, _lock: function() {
|
||||
var score = parseInt(this.score.val(), 10), // TODO: 3.1 >> [['1'], ['2'], ['3', '.1', '.2']]
|
||||
hint = score ? methods._getHint.call(this, score) : this.opt.noRatedMsg;
|
||||
|
||||
$(this).data('readonly', true).css('cursor', '').attr('title', hint);
|
||||
|
||||
this.score.attr('readonly', 'readonly');
|
||||
this.stars.attr('title', hint);
|
||||
|
||||
if (this.cancel) {
|
||||
this.cancel.hide();
|
||||
}
|
||||
}, _roundStars: function(score) {
|
||||
var rest = (score - Math.floor(score)).toFixed(2);
|
||||
|
||||
if (rest > this.opt.round.down) {
|
||||
var icon = 'starOn'; // Up: [x.76 .. x.99]
|
||||
|
||||
if (this.opt.halfShow && rest < this.opt.round.up) { // Half: [x.26 .. x.75]
|
||||
icon = 'starHalf';
|
||||
} else if (rest < this.opt.round.full) { // Down: [x.00 .. x.5]
|
||||
icon = 'starOff';
|
||||
}
|
||||
|
||||
this.stars.eq(Math.ceil(score) - 1).attr('src', this.opt.path + this.opt[icon]);
|
||||
} // Full down: [x.00 .. x.25]
|
||||
}, _target: function(score, evt) {
|
||||
if (this.opt.target) {
|
||||
var target = $(this.opt.target);
|
||||
|
||||
if (target.length === 0) {
|
||||
methods._error.call(this, 'Target selector invalid or missing!');
|
||||
}
|
||||
|
||||
if (this.opt.targetFormat.indexOf('{score}') < 0) {
|
||||
methods._error.call(this, 'Template "{score}" missing!');
|
||||
}
|
||||
|
||||
var mouseover = evt && evt.type == 'mouseover';
|
||||
|
||||
if (score === undefined) {
|
||||
score = this.opt.targetText;
|
||||
} else if (score === null) {
|
||||
score = mouseover ? this.opt.cancelHint : this.opt.targetText;
|
||||
} else {
|
||||
if (this.opt.targetType == 'hint') {
|
||||
score = methods._getHint.call(this, Math.ceil(score));
|
||||
} else if (this.opt.precision) {
|
||||
score = parseFloat(score).toFixed(1);
|
||||
}
|
||||
|
||||
if (!mouseover && !this.opt.targetKeep) {
|
||||
score = this.opt.targetText;
|
||||
}
|
||||
}
|
||||
|
||||
if (score) {
|
||||
score = this.opt.targetFormat.toString().replace('{score}', score);
|
||||
}
|
||||
|
||||
if (target.is(':input')) {
|
||||
target.val(score);
|
||||
} else {
|
||||
target.html(score);
|
||||
}
|
||||
}
|
||||
}, _unlock: function() {
|
||||
$(this).data('readonly', false).css('cursor', 'pointer').removeAttr('title');
|
||||
|
||||
this.score.removeAttr('readonly', 'readonly');
|
||||
|
||||
for (var i = 0; i < this.opt.number; i++) {
|
||||
this.stars.eq(i).attr('title', methods._getHint.call(this, i + 1));
|
||||
}
|
||||
|
||||
if (this.cancel) {
|
||||
this.cancel.css('display', '');
|
||||
}
|
||||
}, cancel: function(click) {
|
||||
return this.each(function() {
|
||||
if ($(this).data('readonly') !== true) {
|
||||
methods[click ? 'click' : 'score'].call(this, null);
|
||||
this.score.removeAttr('value');
|
||||
}
|
||||
});
|
||||
}, click: function(score) {
|
||||
return $(this).each(function() {
|
||||
if ($(this).data('readonly') !== true) {
|
||||
methods._apply.call(this, score);
|
||||
|
||||
if (!this.opt.click) {
|
||||
methods._error.call(this, 'You must add the "click: function(score, evt) { }" callback.');
|
||||
}
|
||||
|
||||
this.opt.click.call(this, score, { type: 'click' });
|
||||
|
||||
methods._target.call(this, score);
|
||||
}
|
||||
});
|
||||
}, destroy: function() {
|
||||
return $(this).each(function() {
|
||||
var that = $(this),
|
||||
raw = that.data('raw');
|
||||
|
||||
if (raw) {
|
||||
that.off('.raty').empty().css({ cursor: raw.style.cursor, width: raw.style.width }).removeData('readonly');
|
||||
} else {
|
||||
that.data('raw', that.clone()[0]);
|
||||
}
|
||||
});
|
||||
}, getScore: function() {
|
||||
var score = [],
|
||||
value ;
|
||||
|
||||
$(this).each(function() {
|
||||
value = this.score.val();
|
||||
|
||||
score.push(value ? parseFloat(value) : undefined);
|
||||
});
|
||||
|
||||
return (score.length > 1) ? score : score[0];
|
||||
}, readOnly: function(readonly) {
|
||||
return this.each(function() {
|
||||
var that = $(this);
|
||||
|
||||
if (that.data('readonly') !== readonly) {
|
||||
if (readonly) {
|
||||
that.off('.raty').children('img').off('.raty');
|
||||
|
||||
methods._lock.call(this);
|
||||
} else {
|
||||
methods._binds.call(this);
|
||||
methods._unlock.call(this);
|
||||
}
|
||||
|
||||
that.data('readonly', readonly);
|
||||
}
|
||||
});
|
||||
}, reload: function() {
|
||||
return methods.set.call(this, {});
|
||||
}, score: function() {
|
||||
return arguments.length ? methods.setScore.apply(this, arguments) : methods.getScore.call(this);
|
||||
}, set: function(settings) {
|
||||
return this.each(function() {
|
||||
var that = $(this),
|
||||
actual = that.data('settings'),
|
||||
news = $.extend({}, actual, settings);
|
||||
|
||||
that.raty(news);
|
||||
});
|
||||
}, setScore: function(score) {
|
||||
return $(this).each(function() {
|
||||
if ($(this).data('readonly') !== true) {
|
||||
methods._apply.call(this, score);
|
||||
methods._target.call(this, score);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.raty = function(method) {
|
||||
if (methods[method]) {
|
||||
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
|
||||
} else if (typeof method === 'object' || !method) {
|
||||
return methods.init.apply(this, arguments);
|
||||
} else {
|
||||
$.error('Method ' + method + ' does not exist!');
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.raty.defaults = {
|
||||
cancel : false,
|
||||
cancelHint : 'Cancel this rating!',
|
||||
cancelOff : 'cancel-off.png',
|
||||
cancelOn : 'cancel-on.png',
|
||||
cancelPlace : 'left',
|
||||
click : undefined,
|
||||
half : false,
|
||||
halfShow : true,
|
||||
hints : ['bad', 'poor', 'regular', 'good', 'gorgeous'],
|
||||
iconRange : undefined,
|
||||
mouseout : undefined,
|
||||
mouseover : undefined,
|
||||
noRatedMsg : 'Not rated yet!',
|
||||
number : 5,
|
||||
numberMax : 20,
|
||||
path : '',
|
||||
precision : false,
|
||||
readOnly : false,
|
||||
round : { down: .25, full: .6, up: .76 },
|
||||
score : undefined,
|
||||
scoreName : 'score',
|
||||
single : false,
|
||||
size : 16,
|
||||
space : true,
|
||||
starHalf : 'star-half.png',
|
||||
starOff : 'star-off.png',
|
||||
starOn : 'star-on.png',
|
||||
target : undefined,
|
||||
targetFormat : '{score}',
|
||||
targetKeep : false,
|
||||
targetText : '',
|
||||
targetType : 'hint',
|
||||
width : undefined
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||