Im trying to modify search parameter in Application Layout Search, to accept dot(.) as literal part of search item for filtering a view..
for example...
"Mr. Smith" will not show up in the view, but
"Mr.Smith" will..
digging deeper with google debugger, I found the function _xspAppSearchSubmit where I can simply change the code encodeURIComponent(val) into encodeURIComponent(val.replace(/s+\.s+/g,'')
which worked when i tested on console. The s+ to remove spaces, \. to keep the dot as literal.
BUT somehow, I cannot find this function in the ApplicationLayout1 custom control, and listed only one event - onItemClick.
Is it possible to add an "onChange" event?
There's an option and optionParam property there but not sure how to apply this.
Im a newbie with xpage and this control, can someone help me work around this, I've checked other sites about this but doesn't explain this kind of issue. I've also checked encodeURIComponent functionality, but it still interprets dot as command. I also learned this dot works like * wildcard.
the Application Layout is ccBaseUI from "One UI", and setup Basic Application Configuration.
code snippet capture
Related
Is there a way to set the zoom level in google docs by using a querystring parameter?
eg- https://docs.google.com/a/getsatisfaction.com/document/d/q3ljkasdlfgkjsdflgkj/edit?zoom=fit
I know there's other querystring parameters you can set, like how "render mode" can be set with the rm parameter (eg - rm=demo). I also found this related SO question, which doesn't mention zoom options.
I have been searching for a while now and have not found any concrete way to manipulate the user's view setting of a document when it's embedded into a webpage via iframe. The only options I have found for getting a doc to adjust within the given frame are as follows:
/pub? - This removes any toolbar display and displays a rough view of the doc. If you use tabs or spaces to line things up, they will not look pretty with this option. I have tried adding the "rm=full" and/or "ui=2" parameters (and other combinations) but those did not do anything.
/preview? - This also removes any ui elements and just straight-up shows the doc. This one doesn't work for me because I need users to be able to print the doc.
I even thought that perhaps the view setting was determined in the doc itself, but anything I tried in that direction (setting to Fit, looking in doc settings, etc) produced no results. So the parameters I am using now are:
/edit?usp=viewing&chrome=false&rm=demo (still overflows in the iframe in Firefox & Chrome)
I hope this info helps anyone else at least a little bit. (I would have provided all this as a comment but I needed more points in order to do that.) It's disappointing that one of the most obvious and relied-upon Docs options cannot be adjusted through parameters.
I have a question regarding Drupal 7 and the Views API.
I'm writing a module that replaces specific text in views. Essentially what I'm trying to do is scan text in a view (or page for that matter). Let's say the view has [special button] will be replaced with
l(t('button'),'mypage',array('query',array('page'=>$node->nid)));
Or whatever. Please understand this is pseudo code.
I've took a look at hook_view(), hook_node_view() (http://api.drupal.org/api/drupal/modules%21node%21node.api.php/function/hook_node_view/7) and neither of them seem to work for me.
I've also looked at http://drupal.org/node/1510828 but that didn't seem to help me out.
Have you tried selecting 'rewrite the output of this field' on the field/s ?
Or alternatively Views PHP should be able to do what you want.
Dear All We had developed a hr application(winform) which consist of almost 98 forms .And its in testing in our organisation .
But the problem now is the management wants all the data inputs to be in UPPERCASE .we had not set any character casing in any of our controls and now its almost very hazardous to change the character casing to all controls
Can anyone suggest any idea to do restrict the input to uppercase only ?.I had tried some thing at the Program.cs file.but it seems not working
Also tried to overide textbox.textchanged event it seems to be a foolish idea any more ideas please considering us as new bie in development
Although this is a weird requirement, you could use LINQ to "upper-text" all TextBox-Controls:
var allTxt = from form in Application.OpenForms.Cast<Form>()
from txt in form.Controls.OfType<TextBoxBase>()
select txt;
foreach (var txt in allTxt)
txt.Text = txt.Text.ToUpper();
Application.OpenForms returns all open forms owned by the application and TextBoxBase is the base class of text-controls(TextBox, RichTextBox). Enumerable.OfType filters for TextBoxBase.
Note that this doesn't search recursively for controls. Only the top control-container is searched currently. If you need a recursive search implement something like this.
Have a look at the KeyPreview event, it may allow you to control all input for the app, regardless of where the focus is.
I would say that by far the best solution would be to replace all the textboxes with your own implementation of the textbox - making changes like this more simple, but if that's not practical, KeyPreview should work.
I would like to "customize" my sharepoint wiki by doing something very simple.
I would like to be able to run a regex on wiki pages looking for [math] and [\math] tags, then take the expression written in the middle (assume this value is stored in a variable x) and replace the whole block by
"<img src='http://latex.codecogs.com/gif.latex?" + x +"'/>"
So for example, the shortcode [math]a^2+b^2=c^2[\math] should end up being displayed as an image as follows (thanks to this online tool):
I have never developed anything in sharepoint, and I've been using it for a week.
Can anybody tell me how I should proceed to add such a feature (if it's possible)?
You can use existing solution like ShortPoint.
Sure - this is simmply done via two methods - 1) You could modify the page directly using SharePoint designer - fly in the code where you want it, 2) The better way - add your code to text file, upload the text file to a document library then use the Content Editor web part, drop it on the page, point it (through the properties) to the text file.
Note: The Content Editor part will allow you to modify the background HTML/Script, however, it has a nasty habit of overriding your code and I've had it actually duplicate itself (adding repeat scripts). Using the Text file eliminiates that issue.
If i understand you correctly, I don't think that the content editor web part is the solution you are looking for. I believe you are wanting to implement a shortcodes solution such as that found in WordPress, correct? In that case, the issue becomes a bit more complex. To really get any kind of custom code that would execute at the necessary stages, you would need a custom solution either implementing additional functionality in the existing rich text editor, or roll your own custom rich text editor.
At that point, you would have complete control over how the content is parsed and interpreted, so you could have both server-side and client side processing. You could make use of templating engines like mustache or handlebars.
To do this, you would need to write your own Custom field type, inherit from SPFieldMultiLineText, override the property FieldRenderingControl, and return your custom control. That way you have the option of implementing it in several different places (custom pege fields in a page layout, custom webparts, custom lists, etc.) and you still get the benefits you want from the out-of-the-box control.
I'm relatively new to Expression Engine, and as I'm learning it I am seeing some stuff missing that WordPress has had for a while. A big one for me is shortcodes, since I will use these to allow CMS users to place more complex content in place with their other content.
I'm not seeing any real equivalent to this in EE, apart from a forthcoming plugin that's in private beta.
As an initial test I'm attempting to fake shortcodes by using delimited strings (e.g. #foo#) in the content field, then using a regex to pull those out and pass them to a function that can retrieve the content out of EE's database.
This brings me to a second question, which is that in looking at EE's API docs, there doesn't appear to be a simple means of retrieving the channel entries programmatically (thinking of something akin to WP's built-in get_posts function).
So my questions are:
a) Can this be done?
b) If so, is my method of approaching it reasonable? Or is there something stupidly obvious I'm missing in my approach?
To reiterate, my main objective here is to have some means of allowing people managing content to drop a code in place in their content that will be replaced with channel content.
Thanks for any advice or help you can give me.
Here's a simple example of the functionality you're looking for.
1) Start by installing Low Replace.
2) Create two Global Variables called gv_hello and gv_goodbye with the values "Hello" and "Goodbye" respectively.
3) Put this text into the body of an entry:
[say_hello]
Nice to see you.
[say_goodbye]
4) Put this into your template, wrapping the Low Replace tag around your body field.
{exp:low_replace
find="[say_hello]|[say_goodbye]"
replace="{gv_hello}|{gv_goodbye}"
multiple="yes"
}
{body}
{/exp:low_replace}
5) It should output this into your browser:
Hello
Nice to see you.
Goodbye
Obviously, this is a really simple example. You can put full blown HTML into your global variable. For example, we've used that to render a complex, interactive graphic that isn't editable but can be easily dropped into a page by any editor.
Unfortunately, due to parse order issues, EE tags won't work inside Global Variables. If you need EE tags in your short code output, you'll need to use Low Variables addon instead of Global Variables.
Continued from the comment:
Do you have examples of the kind of shortcodes you want to support/include? Because i have doubts if controlling the page-layout from a text-field or wysiwyg-field is the way to go.
If you want editors to be able to adjust layout or show/hide extra parts on the page, giving them access to some extra fields in the channel, is (imo) much more manageable and future-proof. For instance some selectfields, a relationship (or playa) field, or a matrix, to let them choose which parts to include/exclude on a page, or which entry from another channel to pull content from.
As said in the comment: i totally understand if you want to replace some #foo# tags with images or data from another field (see other answers: nsm-transplant, low_replace). But, giving an editor access to shortcodes and picking them out, is like writing a template-engine to generate ee-template code for the ee-template-engine.
Using some custom fields to let editors pick and choose parts to embed is, i think, much more manageable.
That being said, you could make a plugin to parse the shortcodes from a textareas content, and then program a lot, to fetch data from other modules you want to support. For channel entries you could build out of the channel data library by objectiveHTML. https://github.com/objectivehtml/Channel-Data
I hear you, I too miss shortcodes from WP -- though the reason they work so easily there is the ubiquity of the_content(). With the great flexibility of EE comes fewer blanket solutions.
I'd suggest looking at NSM Transplant. It should fit the bill for you.
There is also a plugin called Shortcode, which you can find here at
Devot-ee
A quote from the page:
Shortcode aims to allow for more dynamic use of content by authors and
editors, allowing for injection of reusable bits of content or even
whole pieces of functionality into any field in EE