How to correctly customise search.get.js in Alfresco? - alfresco

I'm using Alfresco Enterprise 6.2. Actual changes I need to make belongs to the search.lib.js
This is an import in the search.get.js. I tried modifying search.lib.js itself and had no effect. So I populated the import in the search.get.js and modified it directly. I'm not too sure if it's the right approach. What would be the best way to go about this change?

Keep your files to below location to override.
alfresco\extension\templates\webscripts\org\alfresco\slingshot\search

The approach to overriding web scripts via the alfresco/extension/templates/webscripts/org/alfresco/slingshot/search/search.get.js path has not changed in 6.2 and is still viable.

Related

Afterlogic Webmail Lite custom theme / skin

I would like to make a custom dark theme for a web client.
I tried everything but no matter what I changed I cannot get any changes to take effect. I found out this page in the documentation but I cannot get it to work:
https://afterlogic.com/docs/webmail-lite-8/developers-guide/creating-new-skin
Does anyone have some experience with this webmail client?
The recommended option for creating a new skin is to clone and rename one of the existing skins, and upon making changes to it, run gulp styles --themes YOUR_THEME_NAME command. Once this operation is performed, check static/styles/themes/YOUR_THEME_NAME and see if you get your changes reflected there. If the changes are in place, then it's probably browser cache causing it, try clearing it and see if that helps.
In fact, it's not required to deal with .less files, you can simply create a copy of an existing theme under static/styles/themes directory - but in either case, you need to make sure the new theme is listed in ThemeList section of data/settings/modules/CoreWebclient.config.json configuration file.

RazorGenerator not generating the correct namespace

We're using RazorGenerator for our project. When I edit views, the generated files' namespaces are changed to ASP instead of the RazorGenerator's default, which is supposed to be the folder structure. We didn't change any settings for RazorGenerator (not even sure if there are settings) so I'm not really sure what happened since this happens to my machine only. I already uninstalled/installed the tool but the same thing happens. Anybody have a solution for this? Thanks!
Hey i just had the same issue. According to this http://razorgenerator.codeplex.com/workitem/166 you should create a file in your views folder called razorgenerator.directives and add in it the following:
GeneratePrettyNames: true
and it will generate the correct namespace.

Custom Components in Scenebuilder 2.0

In Scenebuilder 1.1, you could import an entire custom component as a whole.
In 2.0, however, it is importing the component as separate pieces (Container and nodes). Since my custom component relies on being unified to work with its controller and IDs, this breaks it.
Is there anything I can do as of yet? I'd really like to be able to use Java 8 and Scenebuilder 2.0 for its DatePicker. If a full stable release is right around the corner, perhaps I can wait. I'd preferably want to avoid hacky solutions.
Any ideas?
I have only found one way to deal with this kind of back-compatibility: building my own scenebuilder.
It is officially open source so you can check it out with mercurial on bitbucket for instance.
Then you build it and modify it to put all your custom components and dependencies in the same classpath for one unique classloader.
Check the class named FXOMLLoader, it is where the classloader is used, my fix was to explicitly only use one classloader for all components and adding a few repertories with my deps inside to the classpath for it to work.
I have used Jar Class Loader library to do so, and it works pretty well. This is pretty hacky though.

Using z3c.jbot to override Plone document_view

I'm working with Plone 4.0.7 & Python 2.6.7 on Mac OSX 10.7:
I need to tweak the document_view just slightly when in a specific segment of my site so I want to add a conditional to the document.pt. I'm trying to use z3c.jbot to do this but for some reason my changes aren't showing. I'm using the file name Products.CMFDefault.browser.templates.document.pt in order to override the file. I use z3c.jbot all the time and I'm really not sure why this isn't working so any suggestions would be greatly appreciated.
Thanks
I think you probably want to override (in a skin layer) one of these files instead:
main_template.pt
(plonetheme/sunburst/skins/sunburst_templates/main_template.pt or
Products/CMFPlone/skins/plone_templates/main_template.pt)
document_view.pt (Products/CMFPlone/skins/plone_content/document_view.pt)

FLEX components: updating import statements to move the component into another folder

I've just imported a Flex component into my project.
I have a theory question about importing.
all the imports statements in the component source files started with "com.subFolder.etc", but I have preferred to move the component folders into "componentName" and to replace all import statements as "componentName.com.subFolder.etc"
Is this ok ? Everything works perfectly, but I was wondering if the method is correct.
thanks
You can put the components anywhere you like, however you want to organize them. People will site best practices and theory but if you know where everything is and you tell the compiler where they are:
import componentName.com.subFolder.componentToBeUsed;
Everything will compile and run just fine.
Usually you will see code and components broken up in a domain model.
So you'll have:
com.yoursite.views
com.yoursite.events
com.someothersite.renderers
Which correspond to:
/com/yoursite/views
/com/yoursite/events
Basically all of your code living in folders within /com/yoursite/
and:
/com/someothersite/renderers
being a custom renderer you imported from someothersite.com to use in your application.
In the end, for the compiler and the flash player I don't think it matters where you put things as long as your happy and understand it all...and of course 6 months from now when you come back to look at this code!
It's totally correct, yes.
Note that Flex Builder (if you're using it) can automatically replace your import statements/class name when you rename a directory or a .mxml/.as file.
I never tried moving a complete structure, though, but I would't be surprised if it worked too.

Resources