Difference between revisions of "QuestionnaireLayout class"

From Catglobe Wiki
Jump to: navigation, search
(Created page with "{{CGscriptClass_Template |Name=QuestionnaireLayout |Description=A layout for a questionnaire |Constructors= {{CGscriptConstructors_Template|Parameters= {{CGscriptParameters_Te...")
 
Line 7: Line 7:
 
|Description=Fetch existing QuestionnaireLayout}}
 
|Description=Fetch existing QuestionnaireLayout}}
 
{{CGscriptConstructors_Template|Parameters=
 
{{CGscriptConstructors_Template|Parameters=
{{CGscriptParameters_Template|Type=string|Name=name|Description=Resource name}}
+
{{CGscriptParameters_Template|Type=string|Name=name|Description=Resource name|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=parentResourceId|Description=Parent resource}}
{{CGscriptParameters_Template|Type=number|Name=parentResourceId|Description=Parent resource}}
 
 
|Description=Create new QuestionnaireLayout}}
 
|Description=Create new QuestionnaireLayout}}
 
|Properties=
 
|Properties=
Line 28: Line 27:
 
number parentId = 1234;
 
number parentId = 1234;
 
QuestionnaireLayout l = new QuestionnaireLayout("Test layout", parentID);
 
QuestionnaireLayout l = new QuestionnaireLayout("Test layout", parentID);
l.Html = "<meta content='width=device-width'name=viewport><div id=body-in><div id=wrapper><div id=header><div id=logo></div></div><div id=questioncontent>[[QUESTION]]<div>[[COUNTDOWN]]</div><div>[[SPINNER]]</div></div><div id=footer><div id=navigationbar>[[NAVIGATION]]</div><div id=progressbar>[[PROGRESS]]</div></div></div></div>";
+
l.Html = "<div id='questioncontent'>[[QUESTION]]</div><div id='navigationbar'>[[NAVIGATION]]</div>";
 
l.Css = ".cg-ui-question > .cg-ui-text {font-weight: bold;}";
 
l.Css = ".cg-ui-question > .cg-ui-text {font-weight: bold;}";
 
l.Save();
 
l.Save();
 
l.ResourceId;
 
l.ResourceId;
 
</source>
 
</source>

Revision as of 07:46, 27 October 2016

QuestionnaireLayout



A layout for a questionnaire

Constructors

  • (number resourceId "ResourceId of existing QuestionnaireLayout") - Fetch existing QuestionnaireLayout
  • (string name "Resource name", number parentResourceId "Parent resource") - Create new QuestionnaireLayout

Methods

  • Empty Save() - Save the QuestionnaireLayout
  • string ToString() - The string representation of the object

Properties

  • number ResourceId { get; } - The Id of the Resource
  • string ResourceName { get; } - The name of the Resource
  • string Description { get; set; } - Description of the QuestionnaireLayout
  • string Html { get; set; } - The Html of the QuestionnaireLayout
  • string Css { get; set; } - The Css of the QuestionnaireLayout
  • string ObjectTypeName { get; } - The name of the type of object
  • TypeInformation TypeInformation { get; } - Get information about this class


Examples

number parentId = 1234;
QuestionnaireLayout l = new QuestionnaireLayout("Test layout", parentID);
l.Html = "<div id='questioncontent'>[[QUESTION]]</div><div id='navigationbar'>[[NAVIGATION]]</div>";
l.Css = ".cg-ui-question > .cg-ui-text {font-weight: bold;}";
l.Save();
l.ResourceId;