diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/contacts/contacts.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/contacts/contacts.js index 3474acb8c..365ec1237 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/contacts/contacts.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/contacts/contacts.js @@ -1,4 +1,4 @@ -/*页面js模板,必须有init方法*/ +/*页面js模板,必须有init方法*/ (function () { var companyMap; var departmentMap; @@ -104,112 +104,112 @@ } - // 注册点击事件 - $('#lr_contact_companylist').on('tap', function (e) { - e = e || window.event; - console.log(1213); - var et = e.target || e.srcElement; - var $et = $(et); - if (et.tagName === 'IMG' || et.tagName === 'SPAN') { - $et = $et.parent(); - } - - var $list = $('
'); - var flag = false; - var id = $et.attr('data-value'); - console.log(id); - if ($et.hasClass('company')) { - if ($et.hasClass('bottom')) { - $et.removeClass('bottom'); - $et.parent().find('.lr-user-list').remove(); - } - else { - $list.css({ 'padding-left': '10px' }); - // 加载人员 - $.each(userMap[id] || [], function (_index, _item) { - var _html = '\ -
\ - \ - ' + _item.name + '\ -
'; - - $list.append(_html); - flag = true; - }); - // 加载部门 - $.each(departmentMap[id] || [], function (_index, _item) { - var _html = '\ -
\ - ' + _item.name + '\ -
'; - - $list.append(_html); - flag = true; - }); - // 加载公司 - $.each(companyMap[id] || [], function (_index, _item) { - var _html = '\ -
\ - ' + _item.name + '\ -
'; - - $list.append(_html); - flag = true; - }); - - if (flag) { - $et.parent().append($list); - } - $et.addClass('bottom'); - } - $list = null; - return false; - } - else if ($et.hasClass('department')) { - if ($et.hasClass('bottom')) { - $et.removeClass('bottom'); - $et.parent().find('.lr-user-list').remove(); - } - else { - $list.css({ 'padding-left': '10px' }); - // 加载人员 - $.each(userMap[id] || [], function (_index, _item) { - var _html = '\ -
\ - \ - ' + _item.name + '\ -
'; - - $list.append(_html); - flag = true; - }); - // 加载部门 - $.each(departmentMap[id] || [], function (_index, _item) { - var _html = '\ -
\ - ' + _item.name + '\ -
'; - - $list.append(_html); - flag = true; - }); - - if (flag) { - $et.parent().append($list); - } - $et.addClass('bottom'); - } - $list = null; - return false; - } - else if ($et.hasClass('user')) { - var userName = $et.find('span').text(); - learun.nav.go({ path: 'chat', title: userName, isBack: true, isHead: true, param: { hasHistory: true, userId: id }, type: 'right' }); - $list = null; - return false; - } - - }); + // 注册点击事件 + $('#lr_contact_companylist').on('tap', function (e) { + e = e || window.event; + console.log(1213); + var et = e.target || e.srcElement; + var $et = $(et); + if (et.tagName === 'IMG' || et.tagName === 'SPAN') { + $et = $et.parent(); + } + + var $list = $('
'); + var flag = false; + var id = $et.attr('data-value'); + console.log(id); + if ($et.hasClass('company')) { + if ($et.hasClass('bottom')) { + $et.removeClass('bottom'); + $et.parent().find('.lr-user-list').remove(); + } + else { + $list.css({ 'padding-left': '10px' }); + // 加载人员 + $.each(userMap[id] || [], function (_index, _item) { + var _html = '\ +
\ + \ + ' + _item.name + '\ +
'; + + $list.append(_html); + flag = true; + }); + // 加载部门 + $.each(departmentMap[id] || [], function (_index, _item) { + var _html = '\ +
\ + ' + _item.name + '\ +
'; + + $list.append(_html); + flag = true; + }); + // 加载公司 + $.each(companyMap[id] || [], function (_index, _item) { + var _html = '\ +
\ + ' + _item.name + '\ +
'; + + $list.append(_html); + flag = true; + }); + + if (flag) { + $et.parent().append($list); + } + $et.addClass('bottom'); + } + $list = null; + return false; + } + else if ($et.hasClass('department')) { + if ($et.hasClass('bottom')) { + $et.removeClass('bottom'); + $et.parent().find('.lr-user-list').remove(); + } + else { + $list.css({ 'padding-left': '10px' }); + // 加载人员 + $.each(userMap[id] || [], function (_index, _item) { + var _html = '\ +
\ + \ + ' + _item.name + '\ +
'; + + $list.append(_html); + flag = true; + }); + // 加载部门 + $.each(departmentMap[id] || [], function (_index, _item) { + var _html = '\ +
\ + ' + _item.name + '\ +
'; + + $list.append(_html); + flag = true; + }); + + if (flag) { + $et.parent().append($list); + } + $et.addClass('bottom'); + } + $list = null; + return false; + } + // else if ($et.hasClass('user')) { + // var userName = $et.find('span').text(); + // learun.nav.go({ path: 'chat', title: userName, isBack: true, isHead: true, param: { hasHistory: true, userId: id }, type: 'right' }); + // $list = null; + // return false; + // } + + }); // 点击搜索框 $page.find('.searchBox').on('tap', function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/scripts/index.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/scripts/index.js index b34a06580..cb39c8e42 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/scripts/index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/scripts/index.js @@ -1,4 +1,4 @@ -// 有关“空白”模板的简介,请参阅以下文档: +// 有关“空白”模板的简介,请参阅以下文档: // http://go.microsoft.com/fwlink/?LinkID=397704 // 若要在 cordova-simulate 或 Android 设备/仿真器上在页面加载时调试代码: 启动应用,设置断点, // 然后在 JavaScript 控制台中运行 "window.location.reload()"。 @@ -12,12 +12,12 @@ img: 'images/tab10.png', fillimg: 'images/tab11.png' }, - { - page: 'message', - text: '消息', - img: 'images/tab20.png', - fillimg: 'images/tab21.png' - }, + // { + // page: 'message', + // text: '消息', + // img: 'images/tab20.png', + // fillimg: 'images/tab21.png' + // }, { page: 'contacts', text: '通讯录',