<!--
	作者：593670711@qq.com
	时间：2018-04-28
	描述：主页
-->
<div class="app-home" ng-controller="homeController" 
	ng-mouseleave="isMove=false"
	ng-mousemove="moveWindow($event)">
	<div class="left">
		<!-- 软件 Logo -->
		<div class="logo" ng-mousedown="isMove=true" ng-mouseup="isMove=false">
			<img ng-mousedown="$event.preventDefault()" src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg==" 
				ng-src="img/logo.png" alt="Desktop Menu" />
			<div class="logoTitle">Desktop Menu</div>
		</div>
		<!-- 菜单列表 -->
		<div class="menus">
			<div class="item" 
				ng-class="{'active': $index==selectLeftMenu}" 
				ng-repeat="item in leftMenuList | orderBy:'id'" 
				ng-bind="item.className" 
				ng-right-click="rightClickLeftMenu($event, item, $index)" 
				ng-click="clickLeftMenu($index, item);"></div>
			<div class="add" ng-click="addMenu()"></div>
		</div>
		<!-- 日历UI -->
		<div class="bottom">
			<div class="date">
				<div class="day" ng-bind="cData.d"></div>
				<div class="right">					
					<div class="week" ng-bind="cData.week"></div>
					<div class="lunar" ng-bind="cData.cDateString"></div>
				</div>
			</div>
			<div class="copy">&copy;{{cData.y}} Runic All Rights Reserved.</div>
		</div>
	</div>
	<div class="right">
		<!-- 搜索条 、界面按钮 -->
		<div class="topBar" 
			ng-mousedown="isMove=true" 
			ng-mouseup="isMove=false">
			<div class="searchBar" ng-mousedown="$event.stopPropagation()">
				<input type="text" name="search" id="search" ng-model="search" value="" placeholder="Search.." />
				<span class="clearSearch" ng-show="search" ng-click="clearSearch()">×</span>
			</div>
			<div class="btnBox">				
				<div class="btn btnMin" title="最小化" ng-click="minWindow()">-</div>
				<div class="btn btnClose" title="关闭" ng-click="closeWindow()">×</div>
			</div>
		</div>
		<!-- 天气模块 Banner/rootScope数据 -->
		<div class="weather">
			<div class="location">{{location}}</div>
			<div class="weatherTime">{{weatherInfo.observe.update_time | weatherDate}} 发布</div>
			<div class="cel">
				<div class="weatherIcon"><img ng-mousedown="$event.preventDefault()" ng-src="img/weather/{{weatherInfo.observe.weather_code}}.png"/></div>
				<div class="degree">{{weatherInfo.observe.degree}}°</div>
				<div class="weatherShort">{{weatherInfo.observe.weather_short}}</div>
			</div>
			<div class="remind">{{weatherInfo.tips.observe[0]}}</div>
		</div>
		<!-- 菜单应用列表 -->
		<div class="menu-list">
			<!-- 游戏菜单项  -->
			<div class="item" 
					ng-repeat="item in itemList | filter:showClassNameItem | orderBy:['-execNum', 'name']" 
					ng-right-click="rightClickItem($event, item)" 
					ng-dblclick="dblclickItem($event, item)" 
					title="{{item.name}}">
				<div class="icon">
					<img ng-mousedown="$event.preventDefault()" 
						src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg==" 
						ng-src="icons/icon-{{item.icon}}.png" alt="{{item.name}}" />
				</div>
				<div class="name" ng-bind="item.name"></div>
			</div>
		</div>
	</div>
	<!-- 右键菜单 -->
	<div class="rightClickMenu" 
		ng-if="$rightScope.show" 
		ng-style="$rightScope.style" 
		ng-class="{'imageX': $rightScope.imageX, 'imageY': $rightScope.imageY,}">
		<div class="menuItem" 
			ng-class="{'line': item.id==0}" 
			ng-repeat="item in $rightScope.list track by $index" 
			ng-click="$rightScope.clickMenuItemFn($event, item)">
				<div class="title" ng-class="{'mui-navigate-right': item.children && item.children.length>0}" ng-bind="item.value"></div>
				<div class="rightClickMenu childrenMenu" ng-if="item.children&&item.children.length>0">					
					<div class="menuItem"
						ng-repeat="ritem in item.children track by $index"
						ng-click="$rightScope.clickMenuItemFn($event, item, ritem)">
						<div class="title" ng-bind="ritem.value"></div>
					</div>
				</div>
		</div>
	</div>
	<!-- 修改项目 -->
	<div class="mui-input-group editItem" ng-show="$editItem.show">
		<div class="mui-card content">
			<h4 class="mui-text-center">修改</h4>
		    <div class="mui-input-row">
		        <label>项目名称：</label>
		    	<input type="text" class="mui-input-clear" ng-model="$editItem.edit.name" placeholder="请输入项目名称">
		    </div>
		    <div class="mui-input-row">
		        <label>本地路径：</label>
		    	<input type="text" class="mui-input-clear" ng-model="$editItem.edit.route" placeholder="请输入本地路径">
		    </div>
		    <div class="mui-input-row">
		        <label>执行文件：</label>
		    	<input type="text" class="mui-input-clear" ng-model="$editItem.edit.exec" placeholder="请输入执行文件">
		    </div>
		    <div class="mui-input-row">
		        <label>启动参数：</label>
		    	<input type="text" class="mui-input-clear" ng-model="$editItem.edit.param" placeholder="请输入启动参数">
		    </div>
		    <div class="mui-button-row submit">
		        <button type="button" class="mui-btn mui-btn-outlined" ng-click="$editItem=null" >取消</button>
		        <button type="button" class="mui-btn mui-btn-primary" ng-click="$editItem.sure($editItem.edit)" >确认</button>
		    </div>
		</div>
	</div>
</div>