Apply HalloJS to elements created after initialization - edit-in-place

I recently replaced Aloha editor with HalloJS in my CMS for several reasons, the most important of which are HalloJS being more leightweight and a lot easier to customize. A severe problem I have however run into is that it doesn't seem possible to init the HalloJS toolbar to elements that are dynamically added to the DOM after initial initialization of Hallo.
Judging from the source, something is definitlety happening, since a div#hallojstoolbar appears upon clicking the newly created editable in the DOM, but it isn't visible and its widgets, controls & dialogs aren't to be found anywhere.

Ok, I feel slightly silly now. After sifting through heaps of 'foo is not a function' notices in the console before posting this question I found out that it wouldn't work because several of the options set in initialization weren't read/set (anymore).
After manually setting some of the vars at the point they were supposed to be used but missing, I discovered that HalloJS was using all the plugin's default options, such as the contextualToolbar (where I am using the static one) and, more importantly, an empty plugin list. I find this weird, bacause after dynamically adding my new element I tried calling HalloJS with all options set, to no result.
However, if you copy all your prefered option settings (including all plugin references!) into the jQuery.widget('IKS.hallo') settings in the hallo.js file, everything works as expected.
I chose to post this on here anyway since there isn't a single reference to any problem remotely related to this anywhere on the netz. So I figured this could save someone googling the same issue in the future the time it took me to figure this out.

Related

How do you see your html edits after you reload (Firefox DevTools)?

I feel like this should be really easy to find if it exists, but I've been googling for 10 minutes. I don't see it mentioned in the official documentation.
I'm trying to troubleshoot a solution to a problem. The solution requires rearranging the order the head child elements.
It's trivial to make that change with Firefox devtools, but I don't know how to view the page with those changes; if I reload (ctrl+r), the HTML goes back to the server version. Does this feature exist?
FWIW, I can find ways of doing this for CSS and JS changes.
There is currently (as of Firefox 92) no such feature of re-applying HTML changes.
What I found is a feature request in Mozilla's bug tracker.
At the moment, the only workaround for this is to directly transfer the changes on the server side script creating the HTML output once you've done them in the Inspector.
Note: It requires some heuristics to re-apply changes to HTML in the browser because the resources served over the network could change in the meantime.
For CSS, the simple DevTools solution is to replace a file entirely by the saved one. For JavaScript, they have some heuristics to recognize where a line moved when code has changed between two reloads. Though those solutions cannot be transferred to HTML easily, as it is generated dynamically most of the time.

Joomla! 1.5 Category Blog Layout parameters update in database but not when displayed

I apologize if this is an easy question and I was just googling the wrong keywords. It's been a few years since I've used Joomla! but got handed a site to make some changes to, that someone else originally developed and can't seem to figure out what's going on. I'm running Joomla! v1.5.26.
I'm trying to add a blog section to the site, so I created a blog section and category and then I created a new "Category Blog Layout" in my menu and set the Columns value to 3:
However, whenever I view the page, it keeps showing 2 columns. So I went to phpMyAdmin and found the menu in jos_menu and confirmed that the database did in fact get updated:
So next I opened up /components/com_content/views/category/tmpl/blog.php and added this to to the top of the PHP file to see what values were being loaded:
<?php
print '<pre>';
print_r($this->params);
print '</pre>';
?>
Which produced the following results on the front end:
...
[num_leading_articles] => 1
[num_intro_articles] => 4
[num_columns] => 2
[num_links] => 4
...
So for some reason, even though I've set the values to update, and they do in fact update in the database, they are not updating on the front end. I've tried clearing the cache and all that fun stuff, without much luck. If it was just "num_columns" having an issue I could probably just override that functionality. However, it appears to be doing the same thing with all of the parameters, not just number of columns. I'm just using that as an example.
I haven't ruled out the possibility that it's a conflict with some third-party plugin yet, but am trying to see if maybe I'm missing something obvious and someone can point me in the right direction.
--UPDATE: 12/4/12--
So it appears to be a conflict with the sh404sef plugin. I'm not exactly sure what the deal is quite yet, but when I disable the plugin it works fine, but it happens again once I re-enable it. Now to see if I can figure out what's wrong with the plugin.
In Joomla! 1.5 while the parameters are being saved the implementation is effected/affected(?) by the template in use at the time.
Check your templates index.php, or if present the override for com_content's Blog layout (usually found in yourSite/templates/yourtempalte/html/com_content/category/blog.php
You will probably find the override either doesn't handle the columns or has a bug in it.
Okay so I figured out my own problem. As I stated above, I discovered the problem was with the sh404sef plugin. Apparently anytime you make changes to the menu layout settings, you have to purge your entire SEF URL list and then rebuild it. It seems quite strange that we'd have to do that every time, but I guess that was intentional for some reason. Anyway, it's working now. I just wanted to make sure I posted a solution for anybody else who may stumble across this.

How can I make a property page always show up?

I'm currently extending a custom "Platform" for VC-2010 (it is extremely similar to the standard pipeline and mostly just swaps 'cl' for 'gcc') and have run into a problem with the property pages.
I can't seem to figure out how to force a property page to always be visible. This page is for a tool that will pretty much always be run on a special control file that has many different tools run over it (hence why I don't want to directly link it to the file type via the 'FileExtension' in my 'ProjectSchemaDefinitions' file). So far I've only been able to get property pages to display when I've added a file with the correct 'ItemType' as an 'Item' in the vcproj file.
How can I make it so that my custom property page is always displayed, regardless of whether there is a property group for it in the vcproj file?
Thanks
A fresh look at the code this morning revealed the 'ProjectTools' MSBuild item which seems to do exactly what I want.

No Magento Header & Custom Navigation

I can't seem to figure out how to disable the header as a whole. I have installed the blank theme, and have been playing in the page XML, but to no avail. I also cannot seem to switch from 2columns-right to 2columns-left, even though i've run searches for every damn file that includes the phrase and swapped it. I'm wondering if it's just not displaying to me, but I've disabled my catch, repeatedly clear it, and have even tried disabling cookies. Anyway, once all this is done, how do i add static pages and my own navigation.
Sorry I know this covers several questions, but I have been tirelessly searching and experimenting on my own to no avail.
thanks!
I can answer the part about adding new static pages.
Go to Admin , Under CMS->Manage Pages ... choose add new Page
Well, I have some of the problems. I did lots of modification to default/mystore/layout/something.xml but saw nothing happen in the frontend.
Then I did the same modification in default/default/layout/something.xml and now changes where done.
For now for me it seems that I can only modify template files in default/mystore/template but not layout files in default/mystore/layout.
Maybe your issue is the same, that Magento is using the default files and not your theme files?

Bindings MInefield in Xcode and Interface Builder

All right, after having worked through Cocoa Dev Central's "Build a Core Data Application" tutorial I started experimenting with building my own application, using the code and .nib file from the tutorial as a reference to make sure that things are put together properly. Overall I've been managing pretty well with it, however I seem to have hit a snag.
I'm building a form with two NSTextView boxes, like in the tutorial, however linked to different attributes within the same entity. All the other controls work properly and save/refresh their values when I go between records (minus some date box silliness, where the second box doesn't want to save its values). I have checked all of the bindings settings and the NSArrayController against the .nib from the tutorial to see where things could be off; that led to unhooking the first text box and then reconnecting it with the same settings and it suddenly magically working. The second box doesn't want to behave, however, and persists in breaking the program (the debugger shows up, listing all manner of variables and memory addresses and stuff that's frankly quite beyond my comprehension).
Currently, the offending box is configured as follows:
Class: NSTextView
Value: Bound to `history`
Controller Key: selection
Model Key Path: `description`
Checked: Allows Editing Multiple Values Selection
Checked: Conditionally Sets Editable
Checked: Raises For Not Applicable Keys
Any insight into what's going on here?
All right, got it figured out. Changed the attribute name from description and it started behaving; seems the name was triggering something when it compiled that the initial bug check missed.

Resources