Skip to main content
New Participant
Oct 2, 2025 1:58 PM UTC

An entirely unsupported hack to add a "lightbox" to image attachments in Office/Office Companion

How to add lightbox effect to Cityworks Office (Companion) image attachments

 

Download latest release of SimpleLightbox plugin from https://github.com/dbrekalo/simpleLightbox/

 

Add simpleLightbox.min.css to [cityworks]WebsiteAssetscsscityworks.css and [cityworks]WebSiteApp_ThemesGraphiteBlueGray.css

Add simpleLightbox.min.js to [cityworks]WebsiteAssetsjquery.fileupload folder. Rename to jquery.simplelb.js

 

Unminify [cityworks]WebsiteAssetsjquery.fileuploadjquery.fileupload-ui.js, and add "jquery.fileupload/jquery.simplelb" to the require.js define array argument after the "jquery.fileupload/tmpl" at the top of the file.

 

"function" == typeof define && define.amd ? define(["jquery", "jquery.fileupload/tmpl", "jquery.fileupload/jquery.simplelb", "jquery.fileupload/jquery.fileupload-image", "jquery.fileupload/jquery.fileupload-audio", "jquery.fileupload/jquery.fileupload-video", "jquery.fileupload/jquery.fileupload-validate"], e) : e(window.jQuery, window.tmpl)

 

A more cleanly-formatted gist is available here.

    2 replies

    Participating Frequently
    Oct 2, 2025 4:06 PM UTC

    What version of Cityworks have you implemented this on?

    Translate
    Participating Frequently
    Oct 2, 2025 4:07 PM UTC

    Awesome. Thanks for this!!

    Translate