I have just double checked it:
If you call
.setImage() function multiple times, the given image will be prepended on each call.
Perhaps I should have named that function "addImage" in the past to avoid irritation. I consider changing the code in one of the next versions. Then
.setImage() should replace image, if exists, instead of prepending.
Recommendation for setImage
Code: Select all
// file: hooks/header-extras.php
AppGiniHelper.common
.setTitle("your<b>TITLE</b>")
.setImage("table.gif"); // <-- valid image url
Recommendation for setIcon
Code: Select all
// file: hooks/header-extras.php
AppGiniHelper.common
.setTitle("your<b>TITLE</b>")
.setIcon("cog");
List of available (Glyph-) icons:
https://glyphicons.bootstrapcheatsheets.com/
@all:
General recommendations
Please avoid multiple initializations of identical objects like
AppGiniCommon. If you already have initialized
AppGiniCommon in
header-extras.php and assigned that object to a variable named
common, there is no need to initialize another instance of
AppGiniCommon and assign it to the already existing variable. Usually, this is not critical but not best practice.
For that reason of multiple initializations giving side-effects in few scenarios*, please also note there are new, recommended, singleton ways for initializing especially
AppGiniDetailView but also
AppGiniTableView and AppGiniCommon:
https://appgini.bizzworxx.de/products/j ... mentation/
- Detail View
- Table View
Code: Select all
jQuery(function(){
var tv = AppGiniHelper.TV;
});
- Common
Code: Select all
var common = AppGiniHelper.common;
* Reason: due to multiple initializations of AppGiniDetailView by very few developers, there were some side effects especially in DV. So we have decided to refactor this and add singleton functions to avoid such problems in DV. There were no bug reports concerning TV and Common, but to make this more consistent we have also introduced singletons for TV and Common. The old way will still work for backward compatibility. I recommend getting used to using the new syntax. At least if you have problems in Detail View, please consider using the recommended new syntax and testing again before posting a bug report. Thank you!