forked from sunleepy/cooper-mobi
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
136 changed files
with
27,598 additions
and
370 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/sh | ||
#将cooper.Web中的Hybrid目录拷贝到当前Hybrid的目录中 | ||
cp -r ../../cooper/src/Cooper.Web/Hybrid src | ||
cp -r ../../cooper/src/Cooper.Web/Hybrid src/CooperHybrid/assets |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="src" path="src-gen"/> | ||
<classpathentry kind="src" path="gen"/> | ||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> | ||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/> | ||
<classpathentry kind="lib" path="libs/cordova-1.9.0.jar"/> | ||
<classpathentry kind="lib" path="libs/greenDAO.jar"/> | ||
<classpathentry kind="output" path="bin/classes"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.codesharp.cooper" | ||
android:versionCode="1" | ||
android:versionName="0.1" > | ||
|
||
<uses-sdk | ||
android:minSdkVersion="7" | ||
android:targetSdkVersion="15" /> | ||
|
||
<supports-screens | ||
android:largeScreens="true" | ||
android:normalScreens="true" | ||
android:smallScreens="true" | ||
android:resizeable="true" | ||
android:anyDensity="true" /> | ||
<uses-permission android:name="android.permission.VIBRATE" /> | ||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | ||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | ||
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /> | ||
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.RECEIVE_SMS" /> | ||
<uses-permission android:name="android.permission.RECORD_AUDIO" /> | ||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> | ||
<uses-permission android:name="android.permission.READ_CONTACTS" /> | ||
<uses-permission android:name="android.permission.WRITE_CONTACTS" /> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> | ||
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> | ||
<uses-permission android:name="android.permission.BROADCAST_STICKY" /> | ||
|
||
<application | ||
android:icon="@drawable/ic_launcher" | ||
android:label="@string/app_name" | ||
android:theme="@style/AppTheme" | ||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"> | ||
<activity | ||
android:name=".MainActivity" | ||
android:label="@string/title_activity_main" > | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> | ||
<classpathentry kind="lib" path="libs/freemarker.jar"/> | ||
<classpathentry kind="lib" path="libs/greenDAO-generator.jar"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>CooperModelGenerator</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
11 changes: 11 additions & 0 deletions
11
andriod/src/CooperHybrid/CooperModelGenerator/.settings/org.eclipse.jdt.core.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 | ||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | ||
org.eclipse.jdt.core.compiler.compliance=1.6 | ||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate | ||
org.eclipse.jdt.core.compiler.debug.localVariable=generate | ||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.source=1.6 |
Binary file not shown.
Binary file added
BIN
+84.6 KB
andriod/src/CooperHybrid/CooperModelGenerator/libs/greenDAO-generator-javadoc.jar
Binary file not shown.
Binary file added
BIN
+44.1 KB
andriod/src/CooperHybrid/CooperModelGenerator/libs/greenDAO-generator.jar
Binary file not shown.
101 changes: 101 additions & 0 deletions
101
...id/CooperModelGenerator/src/com/codesharp/coopermodelgenerator/ExampleModelGenerator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
package com.codesharp.coopermodelgenerator; | ||
|
||
import de.greenrobot.daogenerator.DaoGenerator; | ||
import de.greenrobot.daogenerator.Entity; | ||
import de.greenrobot.daogenerator.Property; | ||
import de.greenrobot.daogenerator.Schema; | ||
import de.greenrobot.daogenerator.ToMany; | ||
|
||
public class ExampleModelGenerator { | ||
|
||
/** | ||
* @param args | ||
*/ | ||
public static void main(String[] args) throws Exception { | ||
Schema schema = new Schema(3, "com.codesharp.cooper"); | ||
|
||
addTasklist(schema); | ||
addTask(schema); | ||
addTaskIdx(schema); | ||
addChangeLog(schema); | ||
|
||
new DaoGenerator().generateAll(schema, "../src-gen"); | ||
} | ||
|
||
private static void addTasklist(Schema schema) { | ||
Entity tasklist = schema.addEntity("Tasklist"); | ||
tasklist.addIdProperty().autoincrement(); | ||
tasklist.addStringProperty("accountId"); | ||
tasklist.addDateProperty("createTime"); | ||
tasklist.addBooleanProperty("editable"); | ||
tasklist.addStringProperty("extensions"); | ||
tasklist.addStringProperty("tasklistId"); | ||
tasklist.addStringProperty("listType"); | ||
tasklist.addStringProperty("name"); | ||
} | ||
|
||
private static void addTask(Schema schema) { | ||
Entity task = schema.addEntity("Task"); | ||
task.addIdProperty().autoincrement(); | ||
task.addStringProperty("accountId"); | ||
task.addStringProperty("body"); | ||
task.addDateProperty("createDate"); | ||
task.addDateProperty("dueDate"); | ||
task.addStringProperty("taskId"); | ||
task.addBooleanProperty("isPublic"); | ||
task.addDateProperty("lastUpdateDate"); | ||
task.addStringProperty("priority"); | ||
task.addIntProperty("status"); | ||
task.addBooleanProperty("editable"); | ||
task.addStringProperty("subject"); | ||
task.addStringProperty("tasklistId"); | ||
} | ||
|
||
private static void addTaskIdx(Schema schema) { | ||
Entity taskIdx = schema.addEntity("TaskIdx"); | ||
taskIdx.addIdProperty().autoincrement(); | ||
taskIdx.addStringProperty("accountId"); | ||
taskIdx.addStringProperty("by"); | ||
taskIdx.addStringProperty("indexes"); | ||
taskIdx.addStringProperty("key"); | ||
taskIdx.addStringProperty("name"); | ||
taskIdx.addStringProperty("tasklistId"); | ||
} | ||
|
||
private static void addChangeLog(Schema schema) { | ||
Entity changeLog = schema.addEntity("ChangeLog"); | ||
changeLog.addIdProperty().autoincrement(); | ||
changeLog.addStringProperty("accountId"); | ||
changeLog.addStringProperty("changeType"); | ||
changeLog.addStringProperty("dataid"); | ||
changeLog.addBooleanProperty("isSend"); | ||
changeLog.addStringProperty("name"); | ||
changeLog.addStringProperty("tasklistId"); | ||
changeLog.addStringProperty("value"); | ||
} | ||
|
||
// private static void addNote(Schema schema) { | ||
// Entity note = schema.addEntity("Note"); | ||
// note.addIdProperty(); | ||
// note.addStringProperty("text").notNull(); | ||
// note.addStringProperty("comment"); | ||
// note.addDateProperty("date"); | ||
// } | ||
// | ||
// private static void addCustomerOrder(Schema schema) { | ||
// Entity customer = schema.addEntity("Customer"); | ||
// customer.addIdProperty(); | ||
// customer.addStringProperty("name").notNull(); | ||
// | ||
// Entity order = schema.addEntity("Order"); | ||
// order.setTableName("ORDERS"); // "ORDER" is a reserved keyword | ||
// order.addIdProperty(); | ||
// Property orderDate = order.addDateProperty("date").getProperty(); | ||
// Property customerId = order.addLongProperty("customerId").notNull().getProperty(); | ||
// order.addToOne(customer, customerId); | ||
// | ||
// ToMany customerToOrders = customer.addToMany(order, customerId); | ||
// customerToOrders.setName("orders"); | ||
// customerToOrders.orderAsc(orderDate); | ||
// } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.ui-page { | ||
background-image: url('../images/bg-line.png'); | ||
background-repeat: repeat; | ||
} | ||
|
||
.ui-header img { | ||
cursor: pointer; | ||
} | ||
.ui-header img:hover { | ||
width: 28px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title></title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link href="themes/cooper.css" rel="stylesheet" type="text/css" /> | ||
<link href="jquery/css/mobile/jquery.mobile.structure-1.1.1.min.css" rel="stylesheet" | ||
type="text/css" /> | ||
<link href="css/base.css" rel="stylesheet" type="text/css" /> | ||
<style> | ||
|
||
</style> | ||
</head> | ||
<body> | ||
<div data-role="page"> | ||
<div data-role="header" data-position="fixed"> | ||
<div class="ui-btn-left" style="line-height: 50px"> | ||
<img src="images/back.png" /> | ||
</div> | ||
<h1> | ||
cooper:task</h1> | ||
<a class="ui-btn-right" data-icon="check">确定</a> | ||
</div> | ||
<div data-role="content" style="background-color: #fff"> | ||
<div data-role="fieldcontain"> | ||
<label for="priority"> | ||
是否完成</label> | ||
<select name="priority" id="priority" data-role="slider"> | ||
<option value="false">未完成</option> | ||
<option value="true">完成</option> | ||
</select> | ||
</div> | ||
<div data-role="fieldcontain"> | ||
<fieldset data-role="controlgroup" data-type="horizontal"> | ||
<legend>优先级</legend> | ||
<input type="radio" name="priority" id="radio-choice-1" value="0" /> | ||
<label for="radio-choice-1"> | ||
今天</label> | ||
<input type="radio" name="priority" id="radio-choice-2" value="1" /> | ||
<label for="radio-choice-2"> | ||
稍后</label> | ||
<input type="radio" name="priority" id="radio-choice-3" value="2" /> | ||
<label for="radio-choice-3"> | ||
迟些</label> | ||
</fieldset> | ||
</div> | ||
<div data-role="fieldcontain"> | ||
<label for="duetime"> | ||
截止日期</label> | ||
<input type="date" name="duetime" id="duetime" /> | ||
</div> | ||
<div data-role="fieldcontain"> | ||
<label for="subject"> | ||
标题</label> | ||
<input name="subject" id="subject" type="text" placeholder="标题" /> | ||
</div> | ||
<div data-role="fieldcontain"> | ||
<label for="body"> | ||
备注</label> | ||
<textarea placeholder="备注" name="body" id="body" style="height: 200px"></textarea> | ||
</div> | ||
</div> | ||
</div> | ||
<script src="jquery/jquery-1.7.2.min.js" type="text/javascript"></script> | ||
<script src="jquery/jquery.mobile-1.1.0.min.js" type="text/javascript"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.