Skip to content

Instantly share code, notes, and snippets.

@emreeren emreeren/Theme.txt
Last active Aug 29, 2015

Embed
What would you like to do?
Change SambaPOS Theme
{"AccountScreens":null,"AccountTransactionDocumentTypes":null,"AccountTransactionTypes":null,"AccountTypes":null,"Accounts":null,"Actions":null,"AutoConfigurationTasks":[{"CreateBackup":false,"Description":"Enable Dark or Light theme. Default table and menu colors will also update to match colors to theme.","Language":"en","Name":"Switch Theme","SortOrder":40,"TaskData":"[{\"Action\":\"[?Select Theme:Light|Dark:Light|Dark]\",\"ActionType\":4,\"Condition\":null,\"Description\":\"Initialize Parameters\"},{\"Action\":\"function UpdateColor(name,oldColor,newColor)\\u000d\\u000a{\\u000d\\u000a sql.ExecSql(\\\"Update States set Color = '\\\"+newColor+\\\"' where Name = '\\\"+name+\\\"' and Color = '\\\"+oldColor+\\\"'\\\");\\u000d\\u000a}\\u000d\\u000a\\u000d\\u000afunction UpdateMenuItem(oldColor,newColor)\\u000d\\u000a{\\u000d\\u000a sql.ExecSql(\\\"Update ScreenMenuCategories set MenuItemButtonColor = '\\\"+newColor+\\\"' where MenuItemButtonColor = '\\\"+oldColor+\\\"'\\\");\\u000d\\u000a}\\u000d\\u000a\\u000d\\u000afunction UpdateMenuCategory(oldColor,newColor)\\u000d\\u000a{\\u000d\\u000a sql.ExecSql(\\\"Update ScreenMenuCategories set MainButtonColor = '\\\"+newColor+\\\"' where MainButtonColor = '\\\"+oldColor+\\\"'\\\");\\u000d\\u000a}\\u000d\\u000a\\u000d\\u000aif('[:Select Theme]' == 'Dark')\\u000d\\u000a{\\u000d\\u000a theme.UseDark();\\u000d\\u000a UpdateColor('Available','White','#FF3F3F3F');\\u000d\\u000a UpdateColor('New Orders','Orange','#FFEE8D3D');\\u000d\\u000a UpdateColor('Bill Requested','Maroon','#FFAA3A37');\\u000d\\u000a UpdateMenuItem('Green','#FF76923C');\\u000d\\u000a UpdateMenuCategory('Orange','#FFF79646');\\u000d\\u000a}\\u000d\\u000aelse\\u000d\\u000a{\\u000d\\u000a theme.UseLight();\\u000d\\u000a UpdateColor('Available','#FF3F3F3F','White');\\u000d\\u000a UpdateColor('New Orders','#FFEE8D3D','Orange');\\u000d\\u000a UpdateColor('Bill Requested','#FFAA3A37','Maroon');\\u000d\\u000a UpdateMenuItem('#FF76923C','Green');\\u000d\\u000a UpdateMenuCategory('#FFF79646','Orange');\\u000d\\u000a}\\u000d\\u000a\\u000d\\u000adlg.ShowMessage(\\\"Restart SambaPOS now to enable new theme.\\\");\",\"ActionType\":1,\"Condition\":null,\"Description\":\"Update Theme\"}]"}],"AutomationCommands":null,"CalculationSelectors":null,"CalculationTypes":null,"CustomReports":null,"Departments":null,"EntityScreens":null,"EntityTypes":null,"Numerators":null,"OrderTagGroups":null,"PaymentTypes":null,"PrintJobs":null,"PrinterTemplates":null,"Printers":null,"ProgramSettingValues":null,"Rules":null,"Scripts":null,"States":null,"TaskTypes":null,"TicketTagGroups":null,"TicketTypes":null,"Triggers":null}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.