diff --git a/app/corona/Icon-72.png b/app/corona/Icon-72.png deleted file mode 100644 index 8d7207666d..0000000000 Binary files a/app/corona/Icon-72.png and /dev/null differ diff --git a/app/corona/Icon-hdpi.png b/app/corona/Icon-hdpi.png deleted file mode 100644 index 4f08c041af..0000000000 Binary files a/app/corona/Icon-hdpi.png and /dev/null differ diff --git a/app/corona/Icon-ldpi.png b/app/corona/Icon-ldpi.png deleted file mode 100644 index 2d6f3202e0..0000000000 Binary files a/app/corona/Icon-ldpi.png and /dev/null differ diff --git a/app/corona/Icon-mdpi.png b/app/corona/Icon-mdpi.png deleted file mode 100644 index baea0e5ef7..0000000000 Binary files a/app/corona/Icon-mdpi.png and /dev/null differ diff --git a/app/corona/Icon.png b/app/corona/Icon.png deleted file mode 100644 index 2593cbd465..0000000000 Binary files a/app/corona/Icon.png and /dev/null differ diff --git a/app/corona/Icon@2x.png b/app/corona/Icon@2x.png deleted file mode 100644 index 125d533791..0000000000 Binary files a/app/corona/Icon@2x.png and /dev/null differ diff --git a/app/corona/Thumbs.db b/app/corona/Thumbs.db deleted file mode 100644 index c0ef1474be..0000000000 Binary files a/app/corona/Thumbs.db and /dev/null differ diff --git a/app/corona/autoLogin.lua b/app/corona/autoLogin.lua deleted file mode 100644 index a65d84e0dd..0000000000 --- a/app/corona/autoLogin.lua +++ /dev/null @@ -1,103 +0,0 @@ - -local storyboard = require( "storyboard" ) -local scene = storyboard.newScene() - -loginAPI = "" -sessionAPI = "" -myTodoAPI = "" -myBugAPI = "" -myTaskAPI = "" - -config = {} -session = {} - -function autoLogin() - local response = {} - -- 获取config - local result = http.request {url = configAPI, method = "GET", sink = ltn12.sink.table(response) } - - if table.getn(response) == 0 then - native.showAlert("提示", "网络错误,请查看网络或重新设置!", {"我知道了"} ) - else - for i, val in pairs(response) do - config = json.decode(val) - end - - -- 设置API地址 - if config.requestType == "GET" then - loginAPI = zentaoRoot .. "?m=user&f=login" - sessionAPI = zentaoRoot .. "?m=api&f=getSessionID&t=json" - - myTodoAPI = zentaoRoot .. "?m=my&f=todo&t=json" - myTaskAPI = zentaoRoot .. "?m=my&f=task&t=json" - myBugAPI = zentaoRoot .. "?m=my&f=bug&t=json" - elseif config.requestType == "PATH_INFO" then - loginAPI = zentaoRoot .. "user-login.json?a=1" - sessionAPI = zentaoRoot .. "api-getsessionid.json?a=1" - - myTodoAPI = zentaoRoot .. "my-todo.json?a=1" - myTaskAPI = zentaoRoot .. "my-task.json?a=1" - myBugAPI = zentaoRoot .. "my-bug.json?a=1" - end - - -- 获取session - http.request{url = sessionAPI, method = "GET", sink = ltn12.sink.table(session)} - - if table.getn(session) == 0 then - native.showAlert("提示", "网络错误,请查看网络或重新设置!", {"我知道了"} ) - else - session = json.decode(table.concat(session)) - session.data = json.decode(session.data) - - -- 用户登录 - local response2 = {} - - mixPassword = crypto.digest(crypto.md5, md5Password .. session.data.rand) - loginAPI = loginAPI .. "&account=" .. account .. "&password=" .. mixPassword .. "&" .. session.data.sessionName .. "=" .. session.data.sessionID - http.request{url = loginAPI, method = "GET", sink = ltn12.sink.table(response2) } - - if json.decode(table.concat(response2)).status == "failed" then - native.showAlert("登录失败", "网络问题,或用户信息设置错误!", {"我知道了"}) - else - storyboard.gotoScene(true, "index", "slideLeft", 100) - end - - end - - end -end - - --- Called when the scene's view does not exist: -function scene:createScene( event ) - local screenGroup = self.view - - zentaoImg = display.newImage("zentao.png") - zentaoImg.xOrigin = display.contentWidth/2 - zentaoImg.yOrigin = display.contentHeight/2 - screenGroup:insert(zentaoImg) - -end - --- Called immediately after scene has moved onscreen: -function scene:enterScene( event ) - timer.performWithDelay(2000, autoLogin) -end - --- Called when scene is about to move offscreen: -function scene:exitScene( event ) - local group = self.view -end - --- Called prior to the removal of scene's "view" (display group) -function scene:destroyScene( event ) - local group = self.view -end - -scene:addEventListener( "createScene", scene ) -scene:addEventListener( "enterScene", scene ) -scene:addEventListener( "exitScene", scene ) -scene:addEventListener( "destroyScene", scene ) - -return scene - diff --git a/app/corona/backButton.png b/app/corona/backButton.png deleted file mode 100644 index a581b19108..0000000000 Binary files a/app/corona/backButton.png and /dev/null differ diff --git a/app/corona/backButton_over.png b/app/corona/backButton_over.png deleted file mode 100644 index db8b9c330e..0000000000 Binary files a/app/corona/backButton_over.png and /dev/null differ diff --git a/app/corona/background.png b/app/corona/background.png deleted file mode 100644 index 4432eef0e8..0000000000 Binary files a/app/corona/background.png and /dev/null differ diff --git a/app/corona/build.settings b/app/corona/build.settings deleted file mode 100644 index 87c5bc28a3..0000000000 --- a/app/corona/build.settings +++ /dev/null @@ -1,15 +0,0 @@ -settings = -{ - iphone = - { - plist = - { - CFBundleIconFile = "Icon.png", - CFBundleIconFiles = { - "Icon.png", - "Icon@2x.png", - "Icon-72.png", - }, - }, - } -} \ No newline at end of file diff --git a/app/corona/button.png b/app/corona/button.png deleted file mode 100644 index 5998fb2d3a..0000000000 Binary files a/app/corona/button.png and /dev/null differ diff --git a/app/corona/button_over.png b/app/corona/button_over.png deleted file mode 100644 index e538e0f5af..0000000000 Binary files a/app/corona/button_over.png and /dev/null differ diff --git a/app/corona/config.lua b/app/corona/config.lua deleted file mode 100644 index 94af14a076..0000000000 --- a/app/corona/config.lua +++ /dev/null @@ -1,12 +0,0 @@ --- config.lua - -application = -{ - content = - { - width = 320, - height = 480, - scale = "letterbox" - - }, -} \ No newline at end of file diff --git a/app/corona/dkjson.lua b/app/corona/dkjson.lua deleted file mode 100644 index 987587bbc5..0000000000 --- a/app/corona/dkjson.lua +++ /dev/null @@ -1,806 +0,0 @@ - --[==[ - -David Kolf's JSON module for Lua 5.1/5.2 -======================================== - -*Version 2.1* - -This module writes no global values, not even the module table. -Import it using - - json = require ("dkjson") - -Exported functions and values: - -`json.encode (object [, state])` --------------------------------- - -Create a string representing the object. `Object` can be a table, -a string, a number, a boolean, `nil`, `json.null` or any object with -a function `__tojson` in its metatable. A table can only use strings -and numbers as keys and its values have to be valid objects as -well. It raises an error for any invalid data types or reference -cycles. - -`state` is an optional table with the following fields: - - - `indent` - When `indent` (a boolean) is set, the created string will contain - newlines and indentations. Otherwise it will be one long line. - - `keyorder` - `keyorder` is an array to specify the ordering of keys in the - encoded output. If an object has keys which are not in this array - they are written after the sorted keys. - - `level` - This is the initial level of indentation used when `indent` is - set. For each level two spaces are added. When absent it is set - to 0. - - `buffer` - `buffer` is an array to store the strings for the result so they - can be concatenated at once. When it isn't given, the encode - function will create it temporary and will return the - concatenated result. - - `bufferlen` - When `bufferlen` is set, it has to be the index of the last - element of `buffer`. - - `tables` - `tables` is a set to detect reference cycles. It is created - temporary when absent. Every table that is currently processed - is used as key, the value is `true`. - -When `state.buffer` was set, the return value will be `true` on -success. Without `state.buffer` the return value will be a string. - -`json.decode (string [, position [, null]])` --------------------------------------------- - -Decode `string` starting at `position` or at 1 if `position` was -omitted. - -`null` is an optional value to be returned for null values. The -default is `nil`, but you could set it to `json.null` or any other -value. - -The return values are the object or `nil`, the position of the next -character that doesn't belong to the object, and in case of errors -an error message. - -Two metatables are created. Every array or object that is decoded gets -a metatable with the `__jsontype` field set to either `array` or -`object`. If you want to provide your own metatables use the syntax - - json.decode (string, position, null, objectmeta, arraymeta) - -`.__jsonorder` -------------------------- - -`__jsonorder` can overwrite the `keyorder` for a specific table. - -`.__jsontype` ------------------------- - -`__jsontype` can be either `"array"` or `"object"`. This is mainly useful -for tables that can be empty. (The default for empty tables is -`"array"`). - -`.__tojson (self, state)` ------------------------------------- - -You can provide your own `__tojson` function in a metatable. In this -function you can either add directly to the buffer and return true, -or you can return a string. On errors nil and a message should be -returned. - -`json.null` ------------ - -You can use this value for setting explicit `null` values. - -`json.version` --------------- - -Set to `"dkjson 2.1"`. - -`json.quotestring (string)` ---------------------------- - -Quote a UTF-8 string and escape critical characters using JSON -escape sequences. This function is only necessary when you build -your own `__tojson` functions. - -`json.addnewline (state)` -------------------------- - -When `state.indent` is set, add a newline to `state.buffer` and spaces -according to `state.level`. - -LPeg support ------------- - -When the local configuration variable -`always_try_using_lpeg` is set, this module tries to load LPeg to -replace the functions `quotestring` and `decode`. The speed increase -is significant. You can get the LPeg module at - . -When LPeg couldn't be loaded, the pure Lua functions stay active. - -In case you don't want this module to require LPeg on its own, -disable this option: - - --]==] - local always_try_using_lpeg = true - --[==[ - -In this case you can later load LPeg support using - -### `json.use_lpeg ()` - -Require the LPeg module and replace the functions `quotestring` and -and `decode` with functions that use LPeg patterns. -This function returns the module table, so you can load the module -using: - - json = require "dkjson".use_lpeg() - -Alternatively you can use `pcall` so the JSON module still works when -LPeg isn't found. - - json = require "dkjson" - pcall (json.use_lpeg) - -### `json.using_lpeg` - -This variable is set to `true` when LPeg was loaded successfully. - -You can contact the author by sending an e-mail to 'kolf' at the -e-mail provider 'gmx.de'. - ---------------------------------------------------------------------- - -*Copyright (C) 2010, 2011 David Heiko Kolf* - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - - diff --git a/app/corona/htmltotext.lua b/app/corona/htmltotext.lua deleted file mode 100644 index 8dfc0e919b..0000000000 --- a/app/corona/htmltotext.lua +++ /dev/null @@ -1,96 +0,0 @@ -function HTML_ToText (text) - -- Declare variables, load the file. Make tags lowercase. - text = string.gsub (text,"(%b<>)", - function (tag) - return tag:lower() - end) - --[[ - First we kill the developer formatting (tabs, CR, LF) - and produce a long string with no newlines and tabs. - We also kill repeated spaces as browsers ignore them anyway. - ]] - local devkill= - { - ["("..string.char(10)..")"] = " ", - ["("..string.char(13)..")"] = " ", - ["("..string.char(15)..")"] = "", - ["(%s%s+)"]=" ", - } - for pat, res in pairs (devkill) do - text = string.gsub (text, pat, res) - end - -- Then we remove the header. We do this by stripping it first. - text = string.gsub (text, "(<%s*head[^>]*>)", "") - text = string.gsub (text, "(<%s*%/%s*head%s*>)", "") - text = string.gsub (text, "(,*<%/head>)", "") - -- Kill all scripts. First we nuke their attribs. - text = string.gsub (text, "(<%s*script[^>]*>)", "") - text = string.gsub (text, "(