Cheat Sheet

Global Changes

Navigation Bar

Change Icon

// file: hooks/header-extras.php
new AppGiniCommon().setIcon("plus");

Change Title

// file: hooks/header-extras.php
new AppGiniCommon().setTitle("<b>CLINIC</b>Management");

Change Icon and Title

// file: hooks/header-extras.php
new AppGiniCommon()
    .setIcon("plus", "text-danger")
    .setTitle("<b>CLINIC</b>Management");

Remove icon

// file: hooks/header-extras.php
new AppGiniCommon().unsetIcon();

Invert Navbar

new AppGiniCommon().navbar.invert();

Modify Buttons

new AppGiniCommon().navbar.fix();


Page Changes

Detail View

Hide single field

// file: hooks/patients-dv.js
new AppGiniField("id").hide();

Hide multiple fields

// file: hooks/patients-dv.js
new AppGiniFields(["id", "last_name", "first_name"]).hide();

Change label

new AppGiniField("image").label("Picture");

Before: Label = “Image”

After: Label = “Picture”

Hide label

// file: hooks/events-dv.js
new AppGiniField("name_patient")
  .hideLabel();

Before

After

Multi-Column Layout

new AppGiniLayout( [ column_1_width, column_2_width ] )
    .add( column_index, ["fieldname_1", "fieldname_2"])
    .add( column_index, ["fieldname_3", "fieldname_4"])
    ;

Example

new AppGiniLayout([8, 4])
    .add(1, ["last_name", "first_name"])
    .add(2, ["image", "gender"])
    ;

Multi-Column Layout with headlines and dividers

new AppGiniLayout([8, 4])
 	.add(1, ["#Patient", "last_name", "first_name"])
 	.add(1, ["#Anamnesis", "tobacco_usage", "alcohol_intake", "history"])
 	.add(1, ["#History", "surgical_history", "obstetric_history", "genetic_diseases", "other_details"])
 	.add(2, ["#Details", "image", "gender", "sexual_orientation", "birth_date", "age"])
 	.add(2, ["-", "#Contact", "state", "contact_person", "mobile", "comments"])
 	;

Action Buttons: Link

// file: patients-dv.js
var group = container.addGroup("Additional Links");
group.addLink("Link 1", "my_custom_page.php");

Action Buttons: Button

// file: patients-dv.js
group = container.addGroup("Additional Buttons");
group.addButton("Click me!", function () {
	alert("Clicked!")
});

Variations (for links and buttons)

group = container.addGroup("Variations");
group.addLink("Primary", $href , Variation.Primary);
group.addLink("Info", $href, Variation.Info);
group.addLink("Success", $href, Variation.Success);
group.addLink("Warning", $href, Variation.Warning);
group.addLink("Danger", $href, Variation.Danger);

Append Unit

new AppGiniField("mobile")
    .label("Phone")
    .unit("ICE");

Before

After



Shopping Cart