mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Added Ring Language Support (#3662)
* update .gitmodules * Update grammars.yml * Create hello.ring * Create Natural.ring * Create weblib.ring * vendor/grammars/language-ring * fix order in grammars.yml * remove two files from samples * delete hello.ring * Update languages.yml - add the R * Create hello.ring * Create natural.ring * Create weblib.ring * Create grammars.yml * Create .gitmodules * Create languages.yml * Create languages.yml * Create language-ring.txt * Update .gitmodules Prefer HTTPS links. * Update hello.ring Sample file from "real" applications (under permissive license) to train the Bayesian classifier. * Update languages.yml * Update weblib.ring Reduce the file size * Update .gitmodules * Update .gitmodules * Update .gitmodules * Update .gitmodules * Update submodule : language-ring * Update weblib.ring Sample : Using the web library. * Create weighthistory Add Sample * Rename weighthistory to weighthistory.ring * Update weblib.ring
This commit is contained in:
committed by
Colin Seymour
parent
6b221172c0
commit
632bcdc1ad
48
samples/Ring/weblib.ring
Normal file
48
samples/Ring/weblib.ring
Normal file
@@ -0,0 +1,48 @@
|
||||
# Sample : Using the Web Library
|
||||
|
||||
Load "weblib.ring"
|
||||
Load "datalib.ring"
|
||||
Import System.Web
|
||||
|
||||
website = "ex24.ring"
|
||||
|
||||
New SalaryController { Routing() }
|
||||
|
||||
Class SalaryModel from ModelBase
|
||||
|
||||
Class SalaryController From ControllerBase
|
||||
|
||||
Class SalaryView From ViewBase
|
||||
|
||||
oLanguage = new SalaryLanguageEnglish
|
||||
|
||||
Func AddFuncScript oPage,oController
|
||||
return oPage.scriptfuncajax("myadd",oController.cMainURL+
|
||||
oController.cOperation+"=add","mysubpage")
|
||||
|
||||
Func FormViewContent oController,oTranslation,oPage
|
||||
return [
|
||||
[ oTranslation.aColumnsTitles[2], "textbox", "name",
|
||||
oController.oModel.Name, oPage.stylewidth("100%") ],
|
||||
[ oTranslation.aColumnsTitles[3], "textbox", "salary",
|
||||
oController.oModel.Salary, oPage.stylewidth("50%") ]
|
||||
]
|
||||
|
||||
Class SalaryLanguageEnglish
|
||||
cTitle = "Salary Table"
|
||||
cBack = "back"
|
||||
aColumnsTitles = ["ID","Name","Salary"]
|
||||
cOptions = "Options"
|
||||
cSearch = "Search"
|
||||
comboitems = ["Select Option...","Edit","Delete"]
|
||||
cAddRecord = "Add Record"
|
||||
cEditRecord = "Edit Record"
|
||||
cRecordDeleted = "Record Deleted!"
|
||||
aMovePages = ["First","Prev","Next","Last"]
|
||||
cPage = "Page"
|
||||
cOf = "of"
|
||||
cRecordsCount = "Records Count"
|
||||
cSave = "Save"
|
||||
temp = new page
|
||||
cTextAlign = temp.StyleTextRight()
|
||||
cNoRecords = "No records!"
|
||||
Reference in New Issue
Block a user