Add Buttons in Sharepoint Library - button

I would like to know whether it is possible to add buttons to a particular document library's column when a new item is created. I am working on SharePoint without using any development tools like SPD and Visual Studio.So, is there any way to use JavaScript to achieve this? Because, if it is done using java script I can add the java script code to a content editor and get the desired functionality.
What are the any/other ways to achieve this functionality by coding in visual studio?
Thanks

You might be able to achieve it with JavaScript as you suggest. However, don't do it. SharePoint is a complicated product with very complicated means for displaying lists. Don't try to hack it, rather use the appropriate tools (i.e. Visual Studio and/or SharePoint Designer).
To achieve what you want, you will have to create a custom field type definition and an appropriate XSLT rendering template. However, this is both quite complicated. I would recommend either creating a custom list item menu action or a custom button in the ribbon.

Using Visual Studio you have several options. I expect you need to add buttons to the list form (Edit or Display). You can:
create custom ribbon buttons. - The most standard way.
create your own field with the button you need and use this column in the list. Little bit complicated. Can be used in more lists.
create your own Editform for your content type or list. - The most complicated way but with the most possibilities.

Related

Alfresco ajax advanced search

With alfresco advanced search form I would like to perform search by ajax and display the list of search results in the same page (without reloading the page).
Is it possible?
Is there a recommended way to do it?
Thank you in advance
So if I understand you clearly you don't want the page to reload.
Sure that's possible!
Do you start by hacking into the advanced search form or do you create a new page just for this is maybe the first question.
You can do it either way. Probably the latter is easier to maintain and less hacking and you can use a client-site Library of your preference.
If you want to keep the default form you just need to change the following files
advsearch.js, the client-side YUI file which gets run on the form and does the submit
/alfresco/site-webscripts/org/alfresco/components/search/advsearch.get.html.ftl, the html file which has all the div's etc. defined.
So change the client-side library to do the search directly to the repo, take a look at search.js and use the method.
Then define in your template the search results area from search.get.html.ftl.
So basically you're merging these 2 components into 1 big one.

Charts and Tabs ASP.NET

I am currently working on a project that is dealing with charts and tabs within an ASP.NET page. I am assigned to create a chart that will be generated from an array and a menu like system using tabs to select different options for the chart.
I have no idea how to implement this, I am using VS Web Developer 2010. I am new to ASP.NET framework and how to implement charts and tabs with this information. Basically it will be a form that the user will submit options and it will calculate a forecast of payments based on the options selected.
Please help, not sure where to even begin with ASP.NET. I have seen some things regarding AJAX controls but for some reason the controls are not loaded into VS.
For charts you can use asp.net chart control
I don't understand the part of the menu, but I think you can use the tabcontrol in the containers section of the toolbox
I'd highly recommend looking at Highcharts. It's a JavaScript library for rendering charts. It will create charts on the client-side so I'm not sure whether it meets your requirements (there are other products that support server-side generation of charts but I'm less familiar with these).
I'm not sure what you mean by using tabs for selecting different options, but Highcharts does have a lot of different rendering models and looks really good.
Take a look at their demo gallery and documentation for more information.
If you are reluctant to use client side charting solutions, try Highcharts.Net. It is a C# wrapper written around the Highcharts JS library. So you write all your code using Classes and objects in C#, and the library translates that into JS.
The added bonus is that you get to use ASP .Net's state management for data persistence. The project also has samples that can be downloaded here.
If you are using MVC, you could try out DotNet.Highcharts along with samples.

Setting formatting on multiple controls in a InfoPath form at one time

I am creating a form that needs to have 30 or more fields either disabled or set to be read only. They need to be marked as such if the based on the value of a drop-down box.
This is something that I can do using conditional formating that I know, what I want to know is there a way to either add conditional formatting to multiple controls at once or a rule that I can set that will accomplish the same thing?
One requirement is that I can't use programming code to do this. I realize it would probably be far easier to do that way but that is a requirement given to me by my manager.
EDIT: Forgot to add this there are fields that still need to be edited when the other fields are read only.
One feature in InfoPath 2010 (can't remember if it was in 2007) that reduces the pain of this sort of repetitive work is the ability to copy-and-paste rules. With this you can create your read-only rule once and then just paste it onto each of the 30 controls that need it.
You could put it all in a section but your only option for sections is hide/show (not disable or read only). Otherwise you have to setup all the fields against that one dropdown. Huge pain but at least you only have to do it once.
An alternative, which is just about as much work, is to setup two views. One that is readonly and one that is normal. When the user changes the dropdown just flip the view. This method has a bunch of display nuances but does work.

How to edit the Ajax HTML Editor, that I only need a few buttons of it?

I use the HTML Editor from ASP.NET Ajax AjaxControlToolkit http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/HTMLEditor/HTMLEditor.aspx.
Its like: http://s3.imgimg.de/uploads/2889172fdJPG.jpg
But I want to have it like: http://s3.imgimg.de/uploads/3eda09893JPG.jpg
So the default buttons are much overpowered for my users.
Is there a way to reduce the ajax HTMLEditor to this few buttons?
Or is there another controle you can help me with?
You haven't said which one you're using. I would recommend using TinyMCE: http://tinymce.moxiecode.com/
It will be easy to achieve what you want with it.
The best way to achieve this is to take advice from Ed Pitt, I did it this way and I was able to create different versions with different tools. The basic premise is to copy the HTMLEditor.Samples.cs file from the AJAX Control Toolkit source into your app and modify it to only print out the toolbars you want:
http://dot-net-web-developer-bristol.blogspot.com/2009/11/using-ajax-htmleditor-top-toolbar.html
Hope this is what you are looking for

Drupal: create content in popup/lightbox?

In Drupal, is there a way to create new content (based on a content type that uses CCK) in a popup or lightbox or similar technique?
There are at least two worlds that I know of:
http://drupal.org/project/popups_reference which uses http://drupal.org/project/popups
and
http://drupal.org/project/noderelationships which uses http://drupal.org/project/modalframe
Both of these are about creating the node in a modal in order to reference it via a node reference field. There might be ones for more general purposes, or you could probably adapt one of those. I've been enjoying noderelationships lately. Haven't tried the other recently.
The projects sprugman refers to are useful when you need to create a referenced node while you're adding another node. If you simply want to make the /node/add/[contenttype] link to open in a lightbox, try the Lightbox2 module.
There is a great module in Drupal automodal that works with Modal Frame API. What you need to do is simply add a new class 'automodal' to your links... and the magic is done for you.
Another one is the Modal Nodereference module. Here is a quote about it (from the module's project page):
... turns the nodereference widget into a modal popup allowing new linked nodes to be created on the fly. Because it uses an iframe, it should support even Javscript and file uploads within the sub-node.
The big feature: It should work with editors, image fields, and all of those other JavaScripting things. We built it precisely to meet those needs. We started with modalframe, instead of one of the other popup libraries, because we knew that we could make this work with TinyMCE, CKEditor, and ImageField -- libraries that have difficulties dealing with other popup APIs.
It depends on the Automodal module, as well as the excellent Modal Frame API module.

Resources