mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	* 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
		
			
				
	
	
		
			49 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			49 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| # 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!"
 |